Skip to content

Commit

Permalink
Kernel: Report correct architecture for uname()
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarbeutner authored and awesomekling committed Jun 29, 2021
1 parent 85561fe commit a5b4b95
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Kernel/Syscalls/uname.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a5b4b95

Please sign in to comment.