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
ff770b7328
VFS+TmpFS: Add support for creating subdirectories (mkdir)
continuous-integration/drone/push Build is passing
2023-03-10 21:09:08 +01:00
41203df472
libluna/Vector: Use bytes instead of count in resize()
...
This fixes a bug that was causing the heap linked list to become quite corrupted.
2023-03-10 21:07:08 +01:00
e8a401efc2
libluna/Heap: Crash the kernel (but not userspace) on invalid frees
...
This makes them way easier to catch and forces us to get those out of the way.
2023-03-10 21:02:09 +01:00
c376477080
libluna/StaticString: Rename OSize to OtherSize
continuous-integration/drone/push Build is passing
2023-03-08 16:41:09 +01:00
c51b119eb4
StaticString: Add a constructor that takes in another StaticString
2023-03-07 22:18:34 +01:00
abdd460525
tmpfs: use adopt_shared_if_nonnull instead of plain adopt_shared in FileSystem::create()
2023-03-07 22:16:52 +01:00
293be2c75a
tools: Use libluna instead of luna in run-clang-format.sh
2023-03-07 21:08:05 +01:00
e30eec4213
kernel/x86_64: Avoid kernel panics when a page fault occurs in a userspace thread
2023-03-07 21:08:05 +01:00
ca85a69442
kernel: Save floating-point environment when switching in and out of userspace threads
2023-03-07 20:59:11 +01:00
7d045e45c1
libluna/Heap: Zero out newly created heap blocks
2023-03-07 20:45:30 +01:00
eaed109fe9
libluna: Let Alignment.h functions take non-powers-of-two
...
Since the alignment must be known at compile-time, the compiler will optimize for powers of two and leave an inefficient implementation for other values.
2023-03-07 20:37:30 +01:00
80492f6ad3
luna: Add error_name, similar to strerrorname_np from glibc
...
continuous-integration/drone/push Build is passing
man strerrorname_np(3)
2023-03-07 13:14:21 +01:00
3a2e5b7ce0
luna: Adjust cstyle_format's description
continuous-integration/drone/push Build is passing
2023-03-02 13:40:42 +01:00
de38eb6877
luna: Remove pure_cstyle_format
...
continuous-integration/drone/push Build is passing
It was causing a lot of code duplication. If someone doesn't have errors, just return {} from the callback and unwrap the Result.
2023-03-02 13:38:21 +01:00
a595a77421
kernel: Print percentage in splash screen
continuous-integration/drone/push Build is passing
2023-02-27 16:27:59 +01:00
b978d02cfb
luna: Fix %% skipping a character
2023-02-27 16:27:45 +01:00
9afff7c544
kernel: Add a fun splash screen during boot :)
...
continuous-integration/drone/push Build is passing
Mostly for fun.
Has a lot of delay in order to see the actual splash screen.
2023-02-27 16:23:51 +01:00
517ef70214
luna: Add UBSAN.cpp to CMakeLists
continuous-integration/drone/push Build is passing
2023-02-27 15:25:20 +01:00
77887eed80
luna -> libluna
continuous-integration/drone/push Build is passing
2023-02-27 15:22:39 +01:00
65dd3cd7fb
TmpFS: Use StaticString<128> instead of char[128]
2023-02-27 15:22:39 +01:00
5a9d31c2be
luna: Add StaticString, an OOP char[]
2023-02-27 15:22:39 +01:00
8ba571a30e
TmpFS: Use a fixed char array in DirInode's Entry instead of OwnedStringView
2023-02-27 15:22:39 +01:00
f88dc050a9
luna: Add strlcpy()
2023-02-27 15:22:38 +01:00
4fc16915d3
Vector: Fix try_append (hopefully)
...
Still doesn't work with OwnedStringViews inside of structs.
2023-02-27 15:22:38 +01:00
01b6294f76
kernel: Implement creating file inodes in tmpfs directories
2023-02-27 15:22:38 +01:00
a65f4311aa
tmpfs: make the root inode a DirInode instead of a FileInode
2023-02-27 15:22:38 +01:00
dd2f31d8d0
tmpfs: add DirInode skeleton
2023-02-27 15:22:38 +01:00
5fb292bc0e
tmpfs: rename tmpfs::Inode to tmpfs::FileInode
2023-02-27 15:22:37 +01:00