Kernel: Use TRY() in sys$waitid()

This commit is contained in:
Andreas Kling 2021-09-05 18:42:32 +02:00
parent c076d765c4
commit 12d9a6c1fa
Notes: sideshowbarker 2024-07-18 04:40:37 +09:00

View file

@ -52,11 +52,8 @@ KResultOr<FlatPtr> Process::sys$waitid(Userspace<const Syscall::SC_waitid_params
dbgln_if(PROCESS_DEBUG, "sys$waitid({}, {}, {}, {})", params.idtype, params.id, params.infop, params.options);
auto siginfo_or_error = do_waitid(move(waitee), params.options);
if (siginfo_or_error.is_error())
return siginfo_or_error.error();
return copy_to_user(params.infop, &siginfo_or_error.value());
auto siginfo = TRY(do_waitid(move(waitee), params.options));
return copy_to_user(params.infop, &siginfo);
}
}