Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] uml: command line handling cleanup

Command line handling cleanups - a couple of things made static and an
unused declaration removed from header.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Jeff Dike and committed by
Linus Torvalds
16c11163 8bef3e0a

+6 -5
-1
arch/um/include/user_util.h
··· 67 67 extern int switcheroo(int fd, int prot, void *from, void *to, int size); 68 68 extern void setup_machinename(char *machine_out); 69 69 extern void setup_hostinfo(void); 70 - extern void add_arg(char *arg); 71 70 extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); 72 71 extern void init_new_thread_signals(int altstack); 73 72 extern void do_exec(int old_pid, int new_pid);
+4 -3
arch/um/kernel/um_arch.c
··· 23 23 #include "asm/ptrace.h" 24 24 #include "asm/elf.h" 25 25 #include "asm/user.h" 26 + #include "asm/setup.h" 26 27 #include "ubd_user.h" 27 28 #include "asm/current.h" 28 29 #include "asm/setup.h" ··· 43 42 #define DEFAULT_COMMAND_LINE "root=98:0" 44 43 45 44 /* Changed in linux_main and setup_arch, which run before SMP is started */ 46 - char command_line[COMMAND_LINE_SIZE] = { 0 }; 45 + static char command_line[COMMAND_LINE_SIZE] = { 0 }; 47 46 48 - void add_arg(char *arg) 47 + static void add_arg(char *arg) 49 48 { 50 49 if (strlen(command_line) + strlen(arg) + 1 > COMMAND_LINE_SIZE) { 51 50 printf("add_arg: Too many command line arguments!\n"); ··· 450 449 { 451 450 notifier_chain_register(&panic_notifier_list, &panic_exit_notifier); 452 451 paging_init(); 453 - strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 452 + strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 454 453 *cmdline_p = command_line; 455 454 setup_hostinfo(); 456 455 }
+2 -1
include/asm-um/setup.h
··· 2 2 #define SETUP_H_INCLUDED 3 3 4 4 /* POSIX mandated with _POSIX_ARG_MAX that we can rely on 4096 chars in the 5 - * command line, so this choice is ok.*/ 5 + * command line, so this choice is ok. 6 + */ 6 7 7 8 #define COMMAND_LINE_SIZE 4096 8 9