Commit Graph

1484 Commits

Author SHA1 Message Date
429e4c9f61
libc: Disable -pedantic
All checks were successful
continuous-integration/drone/push Build is passing
It does not like TRY().
2023-03-30 21:31:35 +02:00
47ee52dc0a
libc: Add execl()
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-30 21:28:39 +02:00
64bca780a7
kernel: Add /dev/zero
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-30 21:19:16 +02:00
2fbc6105d7
kernel+libc: Add O_DIRECTORY and use it in opendir()
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 22:23:52 +02:00
61f969c60c
ls: Explicitly initialize booleans to false 2023-03-29 22:19:53 +02:00
43f90c4f88
cat: Use ArgumentParser
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 22:10:51 +02:00
e6645ed607
StringView+apps: Add a _sv literal suffix to not confuse function overloads
C++ was being naughty and implicitly casting our fallback const char* to a boolean.
2023-03-29 22:10:01 +02:00
e1c03150f8
ArgumentParser: Return leftover arguments from parse() 2023-03-29 22:07:42 +02:00
75c48e996a
ArgumentParser+date: Add value arguments
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 21:46:07 +02:00
d68f6bd76b
ArgumentParser+ls: Add switch arguments
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 19:25:11 +02:00
a164dcc160
libos: Add libos + very basic ArgumentParser
All checks were successful
continuous-integration/drone/push Build is passing
libluna but for stuff that interests only userspace, like an argument parser or files or stuff like that.
2023-03-29 18:27:02 +02:00
724dab636c
apps: Switch to C++
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 17:56:56 +02:00
ef01f187c3
libluna: Add StringView
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 17:43:10 +02:00
01813ff0dd
String: Rename from_string_literal to from_cstring 2023-03-29 17:34:30 +02:00
ee60ab78b3
String: is_empty + proper initialization 2023-03-29 17:32:53 +02:00
b6c35124d6
libluna: OwnedStringView -> String
Also with inline storage!
2023-03-29 17:28:22 +02:00
7b0b3dabc4
apps: Add ls
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 01:07:58 +02:00
3e30f0a88c
libc: Add opendir, readdir and closedir 2023-03-29 01:06:57 +02:00
5623f3c699
tmpfs: Set the mode of the root directory on creation 2023-03-29 01:06:26 +02:00
0320ffb485
Vector: Fix operator[]
Istg Vector has a curse or something, the annoying and inexplicable bugs always end up in Vector.
2023-03-29 01:05:30 +02:00
0847cfcb65
kernel: Add a getdents() syscall
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-28 21:28:56 +02:00
8eb4d693ac
VFS: Add virtual method get() for getdents() and make existence checking occur in add_entry() 2023-03-28 21:15:26 +02:00
0d54d0ece1
libc: Check for a compatible mode in fdopen()
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-28 20:56:00 +02:00
6239ed83c7
kernel+libc: Add F_GETFD, F_SETFD, F_GETFL and F_SETFL to fcntl 2023-03-28 20:55:38 +02:00
df10544e84
libc: Add libgen.h
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-28 19:47:47 +02:00
d00ca0d3ed
libc: Add setjmp.h
All checks were successful
continuous-integration/drone/push Build is passing
Partially taken from pre-rewrite Luna, converted setjmp.asm to GNU assembly.
2023-03-28 19:40:48 +02:00
b8b8d20f5b
Vector: Let realloc do its job and thus avoid a UAF (a particularly nasty one)
All checks were successful
continuous-integration/drone/push Build is passing
Who even thought that copying from an old pointer passed to realloc() was a good idea?
Me, apparently.

Additionally, the entire point of this memcpy() was to copy the data over from the old buffer (which is already freed btw) to the new buffer, which is already done by realloc.
That's the entire point of realloc. The data is copied over by realloc already.

And even if the old pointer is not unmapped, we scrub freed memory with useless data, so the memcpy sets the vector's buffer to that useless data as well.

I don't even know how I managed to introduce so many bugs into Vector.

At least it should work properly now.
2023-03-28 18:37:12 +02:00
d41e5b7b74
libc: Add signal.h and inttypes.h
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 22:15:28 +01:00
a43550fb9a
apps: Add date
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 21:48:43 +01:00
1635eaf992
kernel: Eliminate the splash screen
Userspace is free to show a splash if it wants, but the kernel shouldn't force it upon us.
2023-03-24 21:48:32 +01:00
770286a19d
kernel+libc: Implement fcntl() for F_DUPFD and F_DUPFD_CLOEXEC
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 21:33:20 +01:00
0de41410c6
kernel: Use path as the new process name instead of argv[0] 2023-03-24 21:26:45 +01:00
8b712b04c2
kernel: Build with optimizations only in debug mode 2023-03-24 21:25:26 +01:00
36e48b2ad2
kernel: Do not attempt to close non-existent FDs on exec() 2023-03-24 21:21:13 +01:00
374a9ff7b8
kernel+libc: Implement O_CLOEXEC 2023-03-24 21:19:24 +01:00
d48d0efb07
kernel: Add names to threads
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 21:05:38 +01:00
4d3050eaab
kernel: Retrieve all thread information before marking it as dead in waitpid()
All checks were successful
continuous-integration/drone/push Build is passing
In case we get interrupted by the reaper thread.
2023-03-24 20:59:07 +01:00
54a4ebe5bb
sh+edit: Miscellaneous fixes
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 20:53:53 +01:00
e76ccd6c4c
kernel+libc+init: Add getppid() and wait()
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 17:39:55 +01:00
7efcc06090
kernel+init+sh: Implement parent processes and waitpid(-1, ...)
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 17:37:04 +01:00
f084b57f39
kernel+sh: Allow using Ctrl+D to send EOF
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-24 17:21:21 +01:00
a18e50ff34
apps: Add cat and edit
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 00:52:26 +01:00
d63c8abbfd
kernel/x86_64: Terminate page faults in a waitpid-friendly way 2023-03-24 00:52:17 +01:00
e2eb9a92cb
sh: Don't do anything if Enter is pressed with no command 2023-03-24 00:51:42 +01:00
b6fb5f3dfe
kernel+libc: Implement waitpid()
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 22:42:24 +01:00
41c7e3780d
kernel: Add support for exit codes and start preparing for waitpid() 2023-03-23 22:25:56 +01:00
355dd6c32b
apps: Add sh
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 22:19:54 +01:00
767dbf521c
Vector: Fix crash when trying to use vector after a call to clear() 2023-03-23 22:19:43 +01:00
00672c4b22
apps/hello: Demo fgets
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 21:35:21 +01:00
0e9890901f
libc: Add (f)getc, getchar, and fgets 2023-03-23 21:35:09 +01:00