cb1ef3e404
libc: Add (v)fprintf and make (v)printf use that
...
continuous-integration/drone/push Build is passing
Let's free libc of console_write!
2023-03-18 20:11:19 +01:00
6a6a56a8b4
kernel: Make /dev/console actually respect the length parameter instead of trusting userspace's null terminators
2023-03-18 20:10:00 +01:00
d01ba20749
kernel/TextConsole: Add a write() function that accepts a fixed-size buffer instead of relying on null terminators
2023-03-18 20:09:10 +01:00
629ed9e43b
libc: Start switching to /dev/console for console IO and add a proper init
2023-03-18 19:23:18 +01:00
8c831a6906
libc: Add mknod()
continuous-integration/drone/push Build is passing
2023-03-18 09:13:31 +01:00
7173c05a22
kernel: Add support for special device files and add a mknod() syscall
2023-03-18 09:10:33 +01:00
d86da05bea
libluna/TarStream: Remove unused functionality
continuous-integration/drone/push Build is passing
2023-03-17 00:00:27 +01:00
b9e8030aac
kernel: Free the initial ramdisk memory after copying everything into the VFS
continuous-integration/drone/push Build is passing
2023-03-16 23:02:53 +01:00
59838f1225
kernel: Replace some raw divisions with get_blocks_from_size()
2023-03-16 23:01:35 +01:00
8c72e9a49a
kernel: Add an exec() system call
...
continuous-integration/drone/push Build is passing
Doesn't support arguments or environment for now.
2023-03-16 22:44:58 +01:00
08c888eaae
kernel+libc: Remove (de)allocate_memory and replace it with POSIX mmap
continuous-integration/drone/push Build is passing
2023-03-14 20:43:15 +01:00
80a897fbc5
libc: Add fileno()
continuous-integration/drone/push Build is passing
2023-03-12 17:38:35 +01:00
3cc2e4b2a4
app: Use C FILE instead of POSIX fd, and switch back to /etc/motd
continuous-integration/drone/push Build is passing
2023-03-12 17:36:56 +01:00
9e9f268562
libc: Make fopen() parse the mode string
2023-03-12 17:36:04 +01:00
d66506256d
kernel/VFS+libc: Introduce modes
continuous-integration/drone/push Build is passing
2023-03-12 16:55:46 +01:00
02dbcbbfa1
kernel: Add strdup_from_user()
continuous-integration/drone/push Build is passing
2023-03-12 16:30:36 +01:00
682d3c753e
kernel+libc: Add mkdir()
continuous-integration/drone/push Build is passing
2023-03-12 15:32:09 +01:00
d2049567c8
libluna+libc: Add strncmp, strncat and strncpy
continuous-integration/drone/push Build is passing
2023-03-12 15:20:44 +01:00
354ffd033c
VFS: Add a size() method to inodes to implement seeking to the end of a file
continuous-integration/drone/push Build is passing
2023-03-12 14:49:21 +01:00
b54a7f3a80
kernel+libc: Add O_* flags and parse them in open()
...
continuous-integration/drone/push Build is passing
O_RDONLY, O_WRONLY, O_RDWR, O_TRUNC, O_CREAT and O_EXCL are fully implemented.
O_APPEND is partially implemented.
Other flags are not here yet.
2023-03-12 14:43:58 +01:00
bd572473ad
kernel: Remove FileDescriptorTable and add a helper to resolve fds to FileDescriptors
2023-03-12 13:57:38 +01:00
7e655e320a
kernel+libc: Add the lseek() syscall, and fseek, ftell, rewind, fsetpos, and fgetpos
continuous-integration/drone/push Build is passing
2023-03-12 13:15:24 +01:00
292433dc39
kernel+libc: Add the write() system call, and fwrite()
2023-03-12 11:37:41 +01:00
92dbe58729
libc: Unify function descriptions
continuous-integration/drone/push Build is passing
2023-03-12 11:15:45 +01:00
36e0a1e970
libc: Add definitions for strnlen, strndup and strlcpy to string.h
continuous-integration/drone/push Build is passing
2023-03-12 11:10:18 +01:00
377b8bea43
libc: Adjust comment in string.cpp
continuous-integration/drone/push Build is passing
2023-03-12 10:45:21 +01:00
3b03e19489
libc: Replace usize with size_t in string.h
continuous-integration/drone/push Build is passing
2023-03-12 10:43:13 +01:00
12bc59ead5
libc: Add strspn, strcspn, and strtok declarations to string.h
continuous-integration/drone/push Build is failing
2023-03-12 10:39:38 +01:00
af0cb83a58
libluna+kernel: Get rid of nullcpy()
continuous-integration/drone/push Build is passing
2023-03-12 10:28:50 +01:00
7649b44aab
libc: Add declaration for strrchr (already implemented)
2023-03-12 10:27:07 +01:00
5c0104111d
libc: Implement fopen, fclose, fread, feof, ferror, and clearerr
continuous-integration/drone/push Build is passing
2023-03-12 10:23:08 +01:00
c0a7f6776f
kernel+libc: Add getpid()
continuous-integration/drone/push Build is passing
2023-03-11 22:19:58 +01:00
8fa72f3cf0
kernel+libc: Implement read()
continuous-integration/drone/push Build is passing
2023-03-11 18:02:50 +01:00
810c4bc257
kernel+libc: Start interfacing with the VFS from userspace (open & close)
...
This commit adds open and close syscalls to the kernel, and adds matching wrappers to libc.
No read/write support, so file descriptors are kind of useless for now.
2023-03-11 17:45:20 +01:00
831973c39a
Option: Allow direct access to the underlying value via operator->
...
Crashes if the Option is empty.
2023-03-11 17:41:11 +01:00
30deed2820
libluna/CPath: Replace size_t with usize
continuous-integration/drone/push Build is passing
2023-03-11 10:39:42 +01:00
0c07e66c4f
Update all files from luna/ paths to libluna/
continuous-integration/drone/push Build is passing
2023-03-11 10:38:34 +01:00
28028d229f
README: Update luna/ links to point to libluna/
2023-03-11 10:37:38 +01:00
dcf4444d0d
Update README.md
continuous-integration/drone/push Build is passing
2023-03-11 10:35:54 +01:00
ff468db675
kernel/ELF+Scheduler: Use VFS instead of TarStream
continuous-integration/drone/push Build is passing
2023-03-11 10:34:08 +01:00
c6aa2fe4ad
VFS: Populate the initial filesystem based on the initial ramdisk
2023-03-11 10:23:46 +01:00
ac304073b4
tmpfs: Disallow creating files/folders with already used names
2023-03-11 10:14:42 +01:00
d95ef110c9
vfs: Add support for creating directories given a full path
2023-03-11 01:13:44 +01:00
6fd28379a9
TarStream: Add a direct pointer to entry data in the Entry struct
2023-03-11 00:55:26 +01:00
e5a41d2d52
tmpfs: Implement FileInode read() and write()
2023-03-11 00:52:39 +01:00
89bea931cd
libluna: Add a very simple Buffer class, to help implement tmpfs files
continuous-integration/drone/push Build is passing
2023-03-11 00:27:08 +01:00
6fbf97292a
VFS: Implement resolve_path() using PathParser
...
continuous-integration/drone/push Build is passing
Already works better than old luna (handles .. correctly)
2023-03-10 22:18:48 +01:00
4c66017807
libluna: Add PathParser, a C++-style way of iterating over path sections
...
Still uses strtok under the hood, though.
2023-03-10 22:17:16 +01:00
5a9da55e05
libluna/CString: Implement strspn and strcspn, and using those implement strtok
2023-03-10 21:32:18 +01:00
6512e9549e
tools: Make replace-stdint.sh search in libluna/ instead of luna/
2023-03-10 21:30:59 +01:00