Skip to content

Commit

Permalink
[PATCH] uml: fix uname output on 32-bit binary on 64-bit host
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Sep 21, 2005
1 parent 36decba commit 8e5cb35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/um/kernel/user_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8e5cb35

Please sign in to comment.