diff options
-rw-r--r-- | arch/um/include/os.h | 2 | ||||
-rw-r--r-- | arch/um/include/user_util.h | 2 | ||||
-rw-r--r-- | arch/um/kernel/um_arch.c | 6 | ||||
-rw-r--r-- | arch/um/os-Linux/util.c | 8 |
4 files changed, 9 insertions, 9 deletions
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 5c74da410451..22666b4a8be7 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -273,7 +273,7 @@ extern void stack_protections(unsigned long address); | |||
273 | extern void task_protections(unsigned long address); | 273 | extern void task_protections(unsigned long address); |
274 | extern int raw(int fd); | 274 | extern int raw(int fd); |
275 | extern void setup_machinename(char *machine_out); | 275 | extern void setup_machinename(char *machine_out); |
276 | extern void setup_hostinfo(void); | 276 | extern void setup_hostinfo(char *buf, int len); |
277 | extern int setjmp_wrapper(void (*proc)(void *, void *), ...); | 277 | extern 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 99492d5c82db..73ffea1829fc 100644 --- a/arch/um/include/user_util.h +++ b/arch/um/include/user_util.h | |||
@@ -36,8 +36,6 @@ extern unsigned long end_vm; | |||
36 | extern unsigned long start_vm; | 36 | extern unsigned long start_vm; |
37 | extern unsigned long long highmem; | 37 | extern unsigned long long highmem; |
38 | 38 | ||
39 | extern char host_info[]; | ||
40 | |||
41 | extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end; | 39 | extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end; |
42 | extern unsigned long _unprotected_end; | 40 | extern unsigned long _unprotected_end; |
43 | extern unsigned long brk_start; | 41 | extern unsigned long brk_start; |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 299d75a41a7f..613fb082bbd5 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 */ | ||
72 | static char host_info[(__NEW_UTS_LEN + 1) * 5]; | ||
73 | |||
70 | static int show_cpuinfo(struct seq_file *m, void *v) | 74 | static 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 | ||
488 | void __init check_bugs(void) | 492 | void __init check_bugs(void) |
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 *), ...) |