On Sunday 01 October 2006 02:45, Nikola Ciprich wrote:
> Jeff,
> I'm terribly sorry, please ignore previous two emails. Problem was not
> in UML itself, but in my scripts, as it happened that I was running it
> with setarch i386, which caused guest uml report i386 architecture, and
> it made quite a mess when I was testing it...
> once again I'm sorry, I guess I really should rather have some sleep :(
> n.

> PS: but anyways, I wonder, is this behavior bug or feature? that running
> x86_64 uml using setarch i386 then causes guest UML report i686 arch?
> (even it's still x86_64)

It is a bug. Under setarch i386, uname returns i686; however, UML should 
correct this. A 32bit UML says i686 on a 64bit host. Patch attached 
(compile-tested).
Please report whether it works or not.
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Index: linux-2.6.git/arch/um/os-Linux/util.c
===================================================================
--- linux-2.6.git.orig/arch/um/os-Linux/util.c
+++ linux-2.6.git/arch/um/os-Linux/util.c
@@ -81,11 +81,18 @@ void setup_machinename(char *machine_out
 	struct utsname host;
 
 	uname(&host);
-#if defined(UML_CONFIG_UML_X86) && !defined(UML_CONFIG_64BIT)
+#ifdef UML_CONFIG_UML_X86
+# ifndef UML_CONFIG_64BIT
 	if (!strcmp(host.machine, "x86_64")) {
 		strcpy(machine_out, "i686");
 		return;
 	}
+# else
+	if (!strcmp(host.machine, "i686")) {
+		strcpy(machine_out, "x86_64");
+		return;
+	}
+# endif
 #endif
 	strcpy(machine_out, host.machine);
 }
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to