summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-06-29 19:19:35 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-29 20:03:36 +0200
commita5b4b95a763cc0972e0e1761d3963424b86559b6 (patch)
tree36dbe3b21dc362c7f04ee2221eb77d9608ccb962 /Kernel
parent85561feb40838f1407078e8de5d7eb0a66a31aad (diff)
downloadserenity-a5b4b95a763cc0972e0e1761d3963424b86559b6.zip
Kernel: Report correct architecture for uname()
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Syscalls/uname.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/Syscalls/uname.cpp b/Kernel/Syscalls/uname.cpp
index dc8e002ca0..c0ca490632 100644
--- a/Kernel/Syscalls/uname.cpp
+++ b/Kernel/Syscalls/uname.cpp
@@ -23,7 +23,12 @@ KResultOr<FlatPtr> Process::sys$uname(Userspace<utsname*> user_buf)
memcpy(buf.sysname, "SerenityOS", 11);
memcpy(buf.release, "1.0-dev", 8);
memcpy(buf.version, "FIXME", 6);
+#if ARCH(I386)
memcpy(buf.machine, "i686", 5);
+#else
+ memcpy(buf.machine, "x86_64", 7);
+#endif
+
memcpy(buf.nodename, g_hostname->characters(), g_hostname->length() + 1);
if (!copy_to_user(user_buf, &buf))