From 1d9554f47082f64c33bdfff1e02098ad8a7aca27 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 9 Aug 2020 12:51:41 -0700 Subject: [PATCH] Kernel: Use Userspace for the gethostname syscall --- Kernel/Process.h | 2 +- Kernel/Syscalls/hostname.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/Process.h b/Kernel/Process.h index f7d84d6208..879997c2ab 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -250,7 +250,7 @@ public: int sys$clock_gettime(clockid_t, Userspace); int sys$clock_settime(clockid_t, Userspace); int sys$clock_nanosleep(Userspace); - int sys$gethostname(char*, ssize_t); + int sys$gethostname(Userspace, ssize_t); int sys$sethostname(const char*, ssize_t); int sys$uname(utsname*); int sys$readlink(Userspace); diff --git a/Kernel/Syscalls/hostname.cpp b/Kernel/Syscalls/hostname.cpp index 8f899dd00b..d81817d2db 100644 --- a/Kernel/Syscalls/hostname.cpp +++ b/Kernel/Syscalls/hostname.cpp @@ -31,7 +31,7 @@ namespace Kernel { extern String* g_hostname; extern Lock* g_hostname_lock; -int Process::sys$gethostname(char* buffer, ssize_t size) +int Process::sys$gethostname(Userspace buffer, ssize_t size) { REQUIRE_PROMISE(stdio); if (size < 0)