From: Paolo 'Blaisorblade' Giarrusso Date: Wed, 21 Sep 2005 16:39:14 +0000 (+0200) Subject: [PATCH] uml: fix uname output on 32-bit binary on 64-bit host X-Git-Tag: v2.6.14-rc3~123 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e5cb35a60c8792ffc3ba89ea66ebdd3c2f01cb1;p=linux-2.6 [PATCH] uml: fix uname output on 32-bit binary on 64-bit host Translate uname output taken from the host if needed. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Linus Torvalds --- diff --git a/arch/um/kernel/user_util.c b/arch/um/kernel/user_util.c index a25f3ea11f..41d17c7151 100644 --- a/arch/um/kernel/user_util.c +++ b/arch/um/kernel/user_util.c @@ -128,6 +128,12 @@ void setup_machinename(char *machine_out) struct utsname host; uname(&host); +#if defined(UML_CONFIG_UML_X86) && !defined(UML_CONFIG_64BIT) + if (!strcmp(host.machine, "x86_64")) { + strcpy(machine_out, "i686"); + return; + } +#endif strcpy(machine_out, host.machine); }