summaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux
diff options
context:
space:
mode:
authorJeff Dike2007-05-06 23:50:59 +0200
committerLinus Torvalds2007-05-07 21:13:00 +0200
commitb4ffb6ad8d8477b561377ca150bbbfc0db02da54 (patch)
tree1f10ef5f1b2afc3ea4e991f473f5e5bfe497f608 /arch/um/os-Linux
parentuml: formatting fixes (diff)
downloadkernel-qcow2-linux-b4ffb6ad8d8477b561377ca150bbbfc0db02da54.tar.gz
kernel-qcow2-linux-b4ffb6ad8d8477b561377ca150bbbfc0db02da54.tar.xz
kernel-qcow2-linux-b4ffb6ad8d8477b561377ca150bbbfc0db02da54.zip
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.c8
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)
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 *), ...)