lkml.org 
[lkml]   [2005]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 6/9] UML - UML/i386 is i386 when running on x86_64
Date
From
From Paolo Giarrusso - Make a UML/i386 instance running on x86_64 pretend
to be i386 rather than x86_64.

Signed-off-by: Jeff Dike <jdike@addtoit.com>

Index: linux-2.6.12-rc6/arch/um/kernel/user_util.c
===================================================================
--- linux-2.6.12-rc6.orig/arch/um/kernel/user_util.c 2005-08-08 12:32:06.000000000 -0400
+++ linux-2.6.12-rc6/arch/um/kernel/user_util.c 2005-08-12 14:00:34.000000000 -0400
@@ -132,7 +132,12 @@
struct utsname host;

uname(&host);
- strcpy(machine_out, host.machine);
+ /* XXX: crude detection of 32-bit binary. */
+ if (sizeof(long) == 4 && !strcmp(host.machine, "x86_64")) {
+ strcpy(machine_out, "i686");
+ } else {
+ strcpy(machine_out, host.machine);
+ }
}

char host_info[(_UTSNAME_LENGTH + 1) * 4 + _UTSNAME_NODENAME_LENGTH + 1];
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-29 22:19    [W:0.025 / U:2.872 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site