mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
[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>
This commit is contained in:
parent
36decba90b
commit
8e5cb35a60
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user