mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:47:35 +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
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
clock_t Process::sys$times(Userspace<tms*> user_times)
|
||||
KResultOr<clock_t> Process::sys$times(Userspace<tms*> user_times)
|
||||
{
|
||||
REQUIRE_PROMISE(stdio);
|
||||
tms times = {};
|
||||
|
@ -38,7 +38,7 @@ clock_t Process::sys$times(Userspace<tms*> user_times)
|
|||
times.tms_cstime = m_ticks_in_kernel_for_dead_children;
|
||||
|
||||
if (!copy_to_user(user_times, ×))
|
||||
return -EFAULT;
|
||||
return EFAULT;
|
||||
|
||||
return TimeManagement::the().uptime_ms() & 0x7fffffff;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue