]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] uml: fix uname output on 32-bit binary on 64-bit host
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Wed, 21 Sep 2005 16:39:14 +0000 (18:39 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 21 Sep 2005 23:16:30 +0000 (16:16 -0700)
Translate uname output taken from the host if needed.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/kernel/user_util.c

index a25f3ea11fd7fb2106108bdee8d3b061ddcfe500..41d17c71511c51cf01077d51d2c6637863892c59 100644 (file)
@@ -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);
 }