diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-05-06 17:50:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:13:00 -0400 |
commit | b4ffb6ad8d8477b561377ca150bbbfc0db02da54 (patch) | |
tree | 1f10ef5f1b2afc3ea4e991f473f5e5bfe497f608 /arch/um/os-Linux | |
parent | a5ed1ffa6c2480cdcf3f0aa945f0b8622fe4e90b (diff) |
uml: host_info tidying
Move the host_info string from util.c to um_arch.c, where it is
actually initialized and used. Also document its lack of locking.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/os-Linux')
-rw-r--r-- | arch/um/os-Linux/util.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c index 56b8a50e8bc2..125854a2aa22 100644 --- a/arch/um/os-Linux/util.c +++ b/arch/um/os-Linux/util.c | |||
@@ -96,15 +96,13 @@ void setup_machinename(char *machine_out) | |||
96 | strcpy(machine_out, host.machine); | 96 | strcpy(machine_out, host.machine); |
97 | } | 97 | } |
98 | 98 | ||
99 | char host_info[(_UTSNAME_LENGTH + 1) * 4 + _UTSNAME_NODENAME_LENGTH + 1]; | 99 | void setup_hostinfo(char *buf, int len) |
100 | |||
101 | void setup_hostinfo(void) | ||
102 | { | 100 | { |
103 | struct utsname host; | 101 | struct utsname host; |
104 | 102 | ||
105 | uname(&host); | 103 | uname(&host); |
106 | sprintf(host_info, "%s %s %s %s %s", host.sysname, host.nodename, | 104 | snprintf(buf, len, "%s %s %s %s %s", host.sysname, host.nodename, |
107 | host.release, host.version, host.machine); | 105 | host.release, host.version, host.machine); |
108 | } | 106 | } |
109 | 107 | ||
110 | int setjmp_wrapper(void (*proc)(void *, void *), ...) | 108 | int setjmp_wrapper(void (*proc)(void *, void *), ...) |