diff options
author | Serge E. Hallyn <serue@us.ibm.com> | 2006-10-02 05:18:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:21 -0400 |
commit | 96b644bdec977b97a45133e5b4466ba47a7a5e65 (patch) | |
tree | 4c6d1f0d54746aa06132628379b2a0efec5e1701 /arch | |
parent | e9ff3990f08e9a0c2839cc22808b01732ea5b3e4 (diff) |
[PATCH] namespaces: utsname: use init_utsname when appropriate
In some places, particularly drivers and __init code, the init utsns is the
appropriate one to use. This patch replaces those with a the init_utsname
helper.
Changes: Removed several uses of init_utsname(). Hope I picked all the
right ones in net/ipv4/ipconfig.c. These are now changed to
utsname() (the per-process namespace utsname) in the previous
patch (2/7)
[akpm@osdl.org: CIFS fix]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Cc: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/arm26/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/cris/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/process.c | 6 | ||||
-rw-r--r-- | arch/i386/kernel/traps.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/um_arch.c | 6 | ||||
-rw-r--r-- | arch/um/sys-x86_64/sysrq.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/process.c | 6 |
12 files changed, 20 insertions, 20 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 0a722e77c143..6bbd93dd186a 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -348,7 +348,7 @@ static void __init setup_processor(void) | |||
348 | cpu_name, processor_id, (int)processor_id & 15, | 348 | cpu_name, processor_id, (int)processor_id & 15, |
349 | proc_arch[cpu_architecture()], cr_alignment); | 349 | proc_arch[cpu_architecture()], cr_alignment); |
350 | 350 | ||
351 | sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); | 351 | sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS); |
352 | sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); | 352 | sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); |
353 | elf_hwcap = list->elf_hwcap; | 353 | elf_hwcap = list->elf_hwcap; |
354 | #ifndef CONFIG_ARM_THUMB | 354 | #ifndef CONFIG_ARM_THUMB |
diff --git a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c index e7eb070f794f..466ddb54b44f 100644 --- a/arch/arm26/kernel/setup.c +++ b/arch/arm26/kernel/setup.c | |||
@@ -143,7 +143,7 @@ static void __init setup_processor(void) | |||
143 | 143 | ||
144 | dump_cpu_info(); | 144 | dump_cpu_info(); |
145 | 145 | ||
146 | sprintf(system_utsname.machine, "%s", list->arch_name); | 146 | sprintf(init_utsname()->machine, "%s", list->arch_name); |
147 | sprintf(elf_platform, "%s", list->elf_name); | 147 | sprintf(elf_platform, "%s", list->elf_name); |
148 | elf_hwcap = list->elf_hwcap; | 148 | elf_hwcap = list->elf_hwcap; |
149 | 149 | ||
diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c index 7af3d5d43e43..ca8b45a0fe2e 100644 --- a/arch/cris/kernel/setup.c +++ b/arch/cris/kernel/setup.c | |||
@@ -160,7 +160,7 @@ setup_arch(char **cmdline_p) | |||
160 | show_etrax_copyright(); | 160 | show_etrax_copyright(); |
161 | 161 | ||
162 | /* Setup utsname */ | 162 | /* Setup utsname */ |
163 | strcpy(system_utsname.machine, cris_machine_name); | 163 | strcpy(init_utsname()->machine, cris_machine_name); |
164 | } | 164 | } |
165 | 165 | ||
166 | static void *c_start(struct seq_file *m, loff_t *pos) | 166 | static void *c_start(struct seq_file *m, loff_t *pos) |
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 96cd0232e1e0..dad02a960e03 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -297,9 +297,9 @@ void show_regs(struct pt_regs * regs) | |||
297 | if (user_mode_vm(regs)) | 297 | if (user_mode_vm(regs)) |
298 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); | 298 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); |
299 | printk(" EFLAGS: %08lx %s (%s %.*s)\n", | 299 | printk(" EFLAGS: %08lx %s (%s %.*s)\n", |
300 | regs->eflags, print_tainted(), system_utsname.release, | 300 | regs->eflags, print_tainted(), init_utsname()->release, |
301 | (int)strcspn(system_utsname.version, " "), | 301 | (int)strcspn(init_utsname()->version, " "), |
302 | system_utsname.version); | 302 | init_utsname()->version); |
303 | printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", | 303 | printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", |
304 | regs->eax,regs->ebx,regs->ecx,regs->edx); | 304 | regs->eax,regs->ebx,regs->ecx,regs->edx); |
305 | printk("ESI: %08lx EDI: %08lx EBP: %08lx", | 305 | printk("ESI: %08lx EDI: %08lx EBP: %08lx", |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 6820b8d643c7..00489b706d27 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -357,9 +357,9 @@ void show_registers(struct pt_regs *regs) | |||
357 | KERN_EMERG "EIP: %04x:[<%08lx>] %s VLI\n" | 357 | KERN_EMERG "EIP: %04x:[<%08lx>] %s VLI\n" |
358 | KERN_EMERG "EFLAGS: %08lx (%s %.*s)\n", | 358 | KERN_EMERG "EFLAGS: %08lx (%s %.*s)\n", |
359 | smp_processor_id(), 0xffff & regs->xcs, regs->eip, | 359 | smp_processor_id(), 0xffff & regs->xcs, regs->eip, |
360 | print_tainted(), regs->eflags, system_utsname.release, | 360 | print_tainted(), regs->eflags, init_utsname()->release, |
361 | (int)strcspn(system_utsname.version, " "), | 361 | (int)strcspn(init_utsname()->version, " "), |
362 | system_utsname.version); | 362 | init_utsname()->version); |
363 | print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip); | 363 | print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip); |
364 | printk(KERN_EMERG "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", | 364 | printk(KERN_EMERG "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", |
365 | regs->eax, regs->ebx, regs->ecx, regs->edx); | 365 | regs->eax, regs->ebx, regs->ecx, regs->edx); |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index a127a1e3c097..7b2f6452ba72 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -424,7 +424,7 @@ void show_regs(struct pt_regs * regs) | |||
424 | printk("NIP: "REG" LR: "REG" CTR: "REG"\n", | 424 | printk("NIP: "REG" LR: "REG" CTR: "REG"\n", |
425 | regs->nip, regs->link, regs->ctr); | 425 | regs->nip, regs->link, regs->ctr); |
426 | printk("REGS: %p TRAP: %04lx %s (%s)\n", | 426 | printk("REGS: %p TRAP: %04lx %s (%s)\n", |
427 | regs, regs->trap, print_tainted(), system_utsname.release); | 427 | regs, regs->trap, print_tainted(), init_utsname()->release); |
428 | printk("MSR: "REG" ", regs->msr); | 428 | printk("MSR: "REG" ", regs->msr); |
429 | printbits(regs->msr, msr_bits); | 429 | printbits(regs->msr, msr_bits); |
430 | printk(" CR: %08lX XER: %08lX\n", regs->ccr, regs->xer); | 430 | printk(" CR: %08lX XER: %08lX\n", regs->ccr, regs->xer); |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 962ad5ebc767..cda2dbe70a76 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -414,7 +414,7 @@ void __init setup_system(void) | |||
414 | smp_release_cpus(); | 414 | smp_release_cpus(); |
415 | #endif | 415 | #endif |
416 | 416 | ||
417 | printk("Starting Linux PPC64 %s\n", system_utsname.version); | 417 | printk("Starting Linux PPC64 %s\n", init_utsname()->version); |
418 | 418 | ||
419 | printk("-----------------------------------------------------\n"); | 419 | printk("-----------------------------------------------------\n"); |
420 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); | 420 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 8ed362140452..98189d8efaca 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -342,7 +342,7 @@ static int __init pSeries_init_panel(void) | |||
342 | { | 342 | { |
343 | /* Manually leave the kernel version on the panel. */ | 343 | /* Manually leave the kernel version on the panel. */ |
344 | ppc_md.progress("Linux ppc64\n", 0); | 344 | ppc_md.progress("Linux ppc64\n", 0); |
345 | ppc_md.progress(system_utsname.release, 0); | 345 | ppc_md.progress(init_utsname()->version, 0); |
346 | 346 | ||
347 | return 0; | 347 | return 0; |
348 | } | 348 | } |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 5f587332234a..77491cf9b259 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -459,7 +459,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
459 | seq_printf(m, "machine\t\t: %s\n", get_system_type()); | 459 | seq_printf(m, "machine\t\t: %s\n", get_system_type()); |
460 | 460 | ||
461 | seq_printf(m, "processor\t: %d\n", cpu); | 461 | seq_printf(m, "processor\t: %d\n", cpu); |
462 | seq_printf(m, "cpu family\t: %s\n", system_utsname.machine); | 462 | seq_printf(m, "cpu family\t: %s\n", init_utsname()->machine); |
463 | seq_printf(m, "cpu type\t: %s\n", get_cpu_subtype()); | 463 | seq_printf(m, "cpu type\t: %s\n", get_cpu_subtype()); |
464 | 464 | ||
465 | show_cpuflags(m); | 465 | show_cpuflags(m); |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 55005710dcbb..97d88e7902f7 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -167,7 +167,7 @@ static char *usage_string = | |||
167 | 167 | ||
168 | static int __init uml_version_setup(char *line, int *add) | 168 | static int __init uml_version_setup(char *line, int *add) |
169 | { | 169 | { |
170 | printf("%s\n", system_utsname.release); | 170 | printf("%s\n", init_utsname()->release); |
171 | exit(0); | 171 | exit(0); |
172 | 172 | ||
173 | return 0; | 173 | return 0; |
@@ -278,7 +278,7 @@ static int __init Usage(char *line, int *add) | |||
278 | { | 278 | { |
279 | const char **p; | 279 | const char **p; |
280 | 280 | ||
281 | printf(usage_string, system_utsname.release); | 281 | printf(usage_string, init_utsname()->release); |
282 | p = &__uml_help_start; | 282 | p = &__uml_help_start; |
283 | while (p < &__uml_help_end) { | 283 | while (p < &__uml_help_end) { |
284 | printf("%s", *p); | 284 | printf("%s", *p); |
@@ -403,7 +403,7 @@ int linux_main(int argc, char **argv) | |||
403 | /* Reserve up to 4M after the current brk */ | 403 | /* Reserve up to 4M after the current brk */ |
404 | uml_reserved = ROUND_4M(brk_start) + (1 << 22); | 404 | uml_reserved = ROUND_4M(brk_start) + (1 << 22); |
405 | 405 | ||
406 | setup_machinename(system_utsname.machine); | 406 | setup_machinename(init_utsname()->machine); |
407 | 407 | ||
408 | #ifdef CONFIG_CMDLINE_ON_HOST | 408 | #ifdef CONFIG_CMDLINE_ON_HOST |
409 | argv1_begin = argv[1]; | 409 | argv1_begin = argv[1]; |
diff --git a/arch/um/sys-x86_64/sysrq.c b/arch/um/sys-x86_64/sysrq.c index d0a25af19a5b..ce3e07fcf283 100644 --- a/arch/um/sys-x86_64/sysrq.c +++ b/arch/um/sys-x86_64/sysrq.c | |||
@@ -16,7 +16,7 @@ void __show_regs(struct pt_regs * regs) | |||
16 | printk("\n"); | 16 | printk("\n"); |
17 | print_modules(); | 17 | print_modules(); |
18 | printk("Pid: %d, comm: %.20s %s %s\n", | 18 | printk("Pid: %d, comm: %.20s %s %s\n", |
19 | current->pid, current->comm, print_tainted(), system_utsname.release); | 19 | current->pid, current->comm, print_tainted(), init_utsname()->release); |
20 | printk("RIP: %04lx:[<%016lx>] ", PT_REGS_CS(regs) & 0xffff, | 20 | printk("RIP: %04lx:[<%016lx>] ", PT_REGS_CS(regs) & 0xffff, |
21 | PT_REGS_RIP(regs)); | 21 | PT_REGS_RIP(regs)); |
22 | printk("\nRSP: %016lx EFLAGS: %08lx\n", PT_REGS_RSP(regs), | 22 | printk("\nRSP: %016lx EFLAGS: %08lx\n", PT_REGS_RSP(regs), |
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 458006ae19f3..de10cb8a2c97 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -294,9 +294,9 @@ void __show_regs(struct pt_regs * regs) | |||
294 | print_modules(); | 294 | print_modules(); |
295 | printk("Pid: %d, comm: %.20s %s %s %.*s\n", | 295 | printk("Pid: %d, comm: %.20s %s %s %.*s\n", |
296 | current->pid, current->comm, print_tainted(), | 296 | current->pid, current->comm, print_tainted(), |
297 | system_utsname.release, | 297 | init_utsname()->release, |
298 | (int)strcspn(system_utsname.version, " "), | 298 | (int)strcspn(init_utsname()->version, " "), |
299 | system_utsname.version); | 299 | init_utsname()->version); |
300 | printk("RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->rip); | 300 | printk("RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->rip); |
301 | printk_address(regs->rip); | 301 | printk_address(regs->rip); |
302 | printk("RSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, regs->rsp, | 302 | printk("RSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, regs->rsp, |