[PATCH] uml: command line handling cleanup
authorJeff Dike <jdike@addtoit.com>
Sat, 7 May 2005 04:30:45 +0000 (21:30 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 7 May 2005 05:09:29 +0000 (22:09 -0700)
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>
arch/um/include/user_util.h
arch/um/kernel/um_arch.c
include/asm-um/setup.h

index 103cd320386cfe56c2b15a6079e6d0bf93cd177e..b8c5b8a952509395c790845e072714093f2655f7 100644 (file)
@@ -67,7 +67,6 @@ extern void *um_kmalloc(int size);
 extern int switcheroo(int fd, int prot, void *from, void *to, int size);
 extern void setup_machinename(char *machine_out);
 extern void setup_hostinfo(void);
-extern void add_arg(char *arg);
 extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int));
 extern void init_new_thread_signals(int altstack);
 extern void do_exec(int old_pid, int new_pid);
index 5c49d88eed3d0701652dc03bffc80ade97d51201..4d10ec372a678a28124428f128d7b3b822b84d9f 100644 (file)
@@ -23,6 +23,7 @@
 #include "asm/ptrace.h"
 #include "asm/elf.h"
 #include "asm/user.h"
+#include "asm/setup.h"
 #include "ubd_user.h"
 #include "asm/current.h"
 #include "asm/setup.h"
@@ -42,9 +43,9 @@
 #define DEFAULT_COMMAND_LINE "root=98:0"
 
 /* Changed in linux_main and setup_arch, which run before SMP is started */
-char command_line[COMMAND_LINE_SIZE] = { 0 };
+static char command_line[COMMAND_LINE_SIZE] = { 0 };
 
-void add_arg(char *arg)
+static void add_arg(char *arg)
 {
        if (strlen(command_line) + strlen(arg) + 1 > COMMAND_LINE_SIZE) {
                printf("add_arg: Too many command line arguments!\n");
@@ -449,7 +450,7 @@ void __init setup_arch(char **cmdline_p)
 {
        notifier_chain_register(&panic_notifier_list, &panic_exit_notifier);
        paging_init();
-       strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
+        strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
        *cmdline_p = command_line;
        setup_hostinfo();
 }
index c85252e803c130923698b9b3e71fb28c3cecf76f..99f086301f4cba151466532eb41b56f4a2f07fc1 100644 (file)
@@ -2,7 +2,8 @@
 #define SETUP_H_INCLUDED
 
 /* POSIX mandated with _POSIX_ARG_MAX that we can rely on 4096 chars in the
- * command line, so this choice is ok.*/
+ * command line, so this choice is ok.
+ */
 
 #define COMMAND_LINE_SIZE 4096