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>
This commit is contained in:
committed by
Linus Torvalds
parent
a5ed1ffa6c
commit
b4ffb6ad8d
@@ -96,15 +96,13 @@ void setup_machinename(char *machine_out)
|
||||
strcpy(machine_out, host.machine);
|
||||
}
|
||||
|
||||
char host_info[(_UTSNAME_LENGTH + 1) * 4 + _UTSNAME_NODENAME_LENGTH + 1];
|
||||
|
||||
void setup_hostinfo(void)
|
||||
void setup_hostinfo(char *buf, int len)
|
||||
{
|
||||
struct utsname host;
|
||||
|
||||
uname(&host);
|
||||
sprintf(host_info, "%s %s %s %s %s", host.sysname, host.nodename,
|
||||
host.release, host.version, host.machine);
|
||||
snprintf(buf, len, "%s %s %s %s %s", host.sysname, host.nodename,
|
||||
host.release, host.version, host.machine);
|
||||
}
|
||||
|
||||
int setjmp_wrapper(void (*proc)(void *, void *), ...)
|
||||
|
Reference in New Issue
Block a user