aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/um/include/os.h2
-rw-r--r--arch/um/include/user_util.h2
-rw-r--r--arch/um/kernel/um_arch.c6
-rw-r--r--arch/um/os-Linux/util.c8
4 files changed, 9 insertions, 9 deletions
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index 5c74da41045..22666b4a8be 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -273,7 +273,7 @@ extern void stack_protections(unsigned long address);
273extern void task_protections(unsigned long address); 273extern void task_protections(unsigned long address);
274extern int raw(int fd); 274extern int raw(int fd);
275extern void setup_machinename(char *machine_out); 275extern void setup_machinename(char *machine_out);
276extern void setup_hostinfo(void); 276extern void setup_hostinfo(char *buf, int len);
277extern int setjmp_wrapper(void (*proc)(void *, void *), ...); 277extern int setjmp_wrapper(void (*proc)(void *, void *), ...);
278 278
279/* time.c */ 279/* time.c */
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h
index 99492d5c82d..73ffea1829f 100644
--- a/arch/um/include/user_util.h
+++ b/arch/um/include/user_util.h
@@ -36,8 +36,6 @@ extern unsigned long end_vm;
36extern unsigned long start_vm; 36extern unsigned long start_vm;
37extern unsigned long long highmem; 37extern unsigned long long highmem;
38 38
39extern char host_info[];
40
41extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end; 39extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;
42extern unsigned long _unprotected_end; 40extern unsigned long _unprotected_end;
43extern unsigned long brk_start; 41extern unsigned long brk_start;
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 299d75a41a7..613fb082bbd 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -17,6 +17,7 @@
17#include "linux/seq_file.h" 17#include "linux/seq_file.h"
18#include "linux/delay.h" 18#include "linux/delay.h"
19#include "linux/module.h" 19#include "linux/module.h"
20#include "linux/utsname.h"
20#include "asm/page.h" 21#include "asm/page.h"
21#include "asm/pgtable.h" 22#include "asm/pgtable.h"
22#include "asm/ptrace.h" 23#include "asm/ptrace.h"
@@ -67,6 +68,9 @@ unsigned long thread_saved_pc(struct task_struct *task)
67 task)); 68 task));
68} 69}
69 70
71/* Changed in setup_arch, which is called in early boot */
72static char host_info[(__NEW_UTS_LEN + 1) * 5];
73
70static int show_cpuinfo(struct seq_file *m, void *v) 74static int show_cpuinfo(struct seq_file *m, void *v)
71{ 75{
72 int index = 0; 76 int index = 0;
@@ -482,7 +486,7 @@ void __init setup_arch(char **cmdline_p)
482 paging_init(); 486 paging_init();
483 strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); 487 strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
484 *cmdline_p = command_line; 488 *cmdline_p = command_line;
485 setup_hostinfo(); 489 setup_hostinfo(host_info, sizeof host_info);
486} 490}
487 491
488void __init check_bugs(void) 492void __init check_bugs(void)
diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c
index 56b8a50e8bc..125854a2aa2 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
99char host_info[(_UTSNAME_LENGTH + 1) * 4 + _UTSNAME_NODENAME_LENGTH + 1]; 99void setup_hostinfo(char *buf, int len)
100
101void 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
110int setjmp_wrapper(void (*proc)(void *, void *), ...) 108int setjmp_wrapper(void (*proc)(void *, void *), ...)