aboutsummaryrefslogtreecommitdiffstats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2009-12-29 22:06:13 +0100
committerAurelien Jarno <aurelien@aurel32.net>2010-02-06 17:19:43 +0100
commitda79030f47788d755031e0903be14bb5559eac94 (patch)
tree84221b09d0168eb3d1d882ce07723f621a2e1fb5 /linux-user/syscall.c
parent95ff895f79c75ba13b63a3408d3b8a49791179c6 (diff)
linux-user: adapt uname machine to emulated CPU
This patch for linux-user adapts the output of the emulated uname() syscall to match the configured CPU. Tested with x86, x86-64 and arm emulation. Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Loïc Minier <lool@dooz.org>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f2dd39eb3..9fb493fba 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -82,6 +82,7 @@
#include <linux/fb.h>
#include <linux/vt.h>
#include "linux_loop.h"
+#include "cpu-uname.h"
#include "qemu.h"
#include "qemu-common.h"
@@ -5739,7 +5740,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
if (!is_error(ret)) {
/* Overrite the native machine name with whatever is being
emulated. */
- strcpy (buf->machine, UNAME_MACHINE);
+ strcpy (buf->machine, cpu_to_uname_machine(cpu_env));
/* Allow the user to override the reported release. */
if (qemu_uname_release && *qemu_uname_release)
strcpy (buf->release, qemu_uname_release);