summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-09-21 20:39:14 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-22 03:16:30 +0400
commit8e5cb35a60c8792ffc3ba89ea66ebdd3c2f01cb1 (patch)
tree85d8b8f9926a765e96024bd8f0d08bf0e6de08e0
parent36decba90b184a25b7f77fb7df1612125cc41ac5 (diff)
downloadlinux-8e5cb35a60c8792ffc3ba89ea66ebdd3c2f01cb1.tar.xz
[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 <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/um/kernel/user_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/um/kernel/user_util.c b/arch/um/kernel/user_util.c
index a25f3ea11fd7..41d17c71511c 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);
}