Kernel: Report correct architecture for uname()

This commit is contained in:
Gunnar Beutner 2021-06-29 19:19:35 +02:00 committed by Andreas Kling
parent 85561feb40
commit a5b4b95a76
Notes: sideshowbarker 2024-07-18 11:19:43 +09:00

View file

@ -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))