1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-03 05:32:13 +00:00

Kernel: Don't return -EFOO when return type is KResultOr<...>

This commit is contained in:
Andreas Kling 2021-03-15 09:04:04 +01:00
parent 2b269b27e7
commit a166a65eff
5 changed files with 7 additions and 6 deletions

View file

@ -131,12 +131,12 @@ KResultOr<FlatPtr> handle(RegisterState& regs, FlatPtr function, FlatPtr arg1, F
if (function >= Function::__Count) {
dbgln("Unknown syscall {} requested ({:08x}, {:08x}, {:08x})", function, arg1, arg2, arg3);
return -ENOSYS;
return ENOSYS;
}
if (s_syscall_table[function] == nullptr) {
dbgln("Null syscall {} requested, you probably need to rebuild this program!", function);
return -ENOSYS;
return ENOSYS;
}
return (process.*(s_syscall_table[function]))(arg1, arg2, arg3);
}