summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-01 15:07:01 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-01 15:07:01 +0100
commitbebceaa32ce53ad7042673ce01f497da0d3bade4 (patch)
tree61773a6dfa763b4dd68433184b52e24d35220ddf /Kernel
parenta1a82c1d95ef8e5932f439483ee11b6a8c424c4c (diff)
downloadserenity-bebceaa32ce53ad7042673ce01f497da0d3bade4.zip
Kernel: Use Userspace<T> in sys$select()
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Process.h2
-rw-r--r--Kernel/Syscalls/select.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h
index 263b099cb2..68dc13539d 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -259,7 +259,7 @@ public:
KResultOr<int> sys$madvise(void*, size_t, int advice);
KResultOr<int> sys$msyscall(void*);
KResultOr<int> sys$purge(int mode);
- KResultOr<int> sys$select(const Syscall::SC_select_params*);
+ KResultOr<int> sys$select(Userspace<const Syscall::SC_select_params*>);
KResultOr<int> sys$poll(Userspace<const Syscall::SC_poll_params*>);
KResultOr<ssize_t> sys$get_dir_entries(int fd, Userspace<void*>, ssize_t);
KResultOr<int> sys$getcwd(Userspace<char*>, size_t);
diff --git a/Kernel/Syscalls/select.cpp b/Kernel/Syscalls/select.cpp
index 4076a871d0..969de51286 100644
--- a/Kernel/Syscalls/select.cpp
+++ b/Kernel/Syscalls/select.cpp
@@ -32,10 +32,10 @@
namespace Kernel {
-KResultOr<int> Process::sys$select(const Syscall::SC_select_params* user_params)
+KResultOr<int> Process::sys$select(Userspace<const Syscall::SC_select_params*> user_params)
{
REQUIRE_PROMISE(stdio);
- Syscall::SC_select_params params;
+ Syscall::SC_select_params params {};
if (!copy_from_user(&params, user_params))
return EFAULT;