mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
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.
This commit is contained in:
parent
9af1e1a3bf
commit
ac71775de5
70 changed files with 747 additions and 742 deletions
|
@ -32,11 +32,11 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
int Process::sys$purge(int mode)
|
||||
KResultOr<int> Process::sys$purge(int mode)
|
||||
{
|
||||
REQUIRE_NO_PROMISES;
|
||||
if (!is_superuser())
|
||||
return -EPERM;
|
||||
return EPERM;
|
||||
int purged_page_count = 0;
|
||||
if (mode & PURGE_ALL_VOLATILE) {
|
||||
NonnullRefPtrVector<AnonymousVMObject> vmobjects;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue