Commit graph

5 commits

Author SHA1 Message Date
Andreas Kling
21a5fb0fa2 LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCore
With this change, System::foo() becomes Core::System::foo().

Since LibCore builds on other systems than SerenityOS, we now have to
make sure that wrappers work with just a standard C library underneath.
2021-11-23 11:33:36 +01:00
Andreas Kling
acc2eccede LibSystem: Add wrapper for fstat() 2021-11-23 11:33:36 +01:00
Andreas Kling
3d34216b9a LibSystem: Add ErrorOr<T> wrapper for sigaction() :^) 2021-11-22 19:28:31 +01:00
Andreas Kling
4e530135d5 AK+LibSystem+LibMain: Add Error::from_syscall() for syscall failures
This creates an error that contains the name of the syscall that failed.
This allows error handlers to print out the name of the call if they
want to. :^)
2021-11-22 19:28:31 +01:00
Andreas Kling
dc486fa3f9 LibSystem: Add pledge() and unveil() wrappers that return ErrorOr<void>
These will be more ergonomic to use together with TRY(). :^)
2021-11-22 18:34:08 +01:00