Andreas Kling
ac71775de5
Kernel: Make all syscall functions return KResultOr<T>
...
This makes it a lot easier to return errors since we no longer have to
worry about negating EFOO errors and can just return them flat.
2021-03-01 13:54:32 +01:00
Andreas Kling
f5d916a881
Kernel: Make sys$anon_create() fail if size == 0
...
An empty anonymous file is useless since it cannot be resized anyway,
so let's not support creating it.
2021-01-25 09:36:42 +01:00
Andreas Kling
7899e14e72
Kernel: Make sys$anon_create() require the "stdio" promise if pledged
2021-01-15 19:10:30 +01:00
Andreas Kling
a525d0271c
Kernel: Fix bogus negation of alloc_fd() error in sys$anon_create()
...
Thanks to Idan for spotting this!
2021-01-15 15:13:48 +01:00
Andreas Kling
fb4993f067
Kernel: Add anonymous files, created with sys$anon_create()
...
This patch adds a new AnonymousFile class which is a File backed by
an AnonymousVMObject that can only be mmap'ed and nothing else, really.
I'm hoping that this can become a replacement for shbufs. :^)
2021-01-15 13:56:47 +01:00