From: Peter Maydell Date: Sat, 10 May 2014 11:25:53 +0000 (+0100) Subject: linux-user/uname: Return correct uname string for x86_64 X-Git-Tag: v2.1.0-rc0~52^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4d13be8b8b817cbca7db2f880628d7ae5b74799f;p=qemu-xen-unstable.git linux-user/uname: Return correct uname string for x86_64 We were returning the incorrect uname string (with a hyphen, not an underscore) for x86_64. Fix this by removing the x86_64 special case, since the default "just use UNAME_MACHINE" behaviour suffices. This leaves cpu_to_uname_machine() special cases for only those architectures which need to vary the string based on runtime CPU features. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- diff --git a/linux-user/uname.c b/linux-user/uname.c index f5d4c66f59..1e6560d724 100644 --- a/linux-user/uname.c +++ b/linux-user/uname.c @@ -52,9 +52,7 @@ const char *cpu_to_uname_machine(void *cpu_env) /* earliest emulated CPU is ARMv5TE; qemu can emulate the 1026, but not its * Jazelle support */ return "armv5te" utsname_suffix; -#elif defined(TARGET_X86_64) - return "x86-64"; -#elif defined(TARGET_I386) +#elif defined(TARGET_I386) && !defined(TARGET_X86_64) /* see arch/x86/kernel/cpu/bugs.c: check_bugs(), 386, 486, 586, 686 */ CPUState *cpu = ENV_GET_CPU((CPUX86State *)cpu_env); int family = object_property_get_int(OBJECT(cpu), "family", NULL);