[parisc-linux-cvs] /proc/cmdline truncated

Richard Hirst rhirst@linuxcare.com
Mon, 18 Jun 2001 15:35:20 +0100


Our /proc/cmdline only ever shows the first element of the complete
command line.  This is because we had command_line = saved_command_line,
and command_line gets nulls poked in to it in later processing, see
init/main.c:parse_options().


Index: Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/Makefile,v
retrieving revision 1.60
diff -u -r1.60 Makefile
--- Makefile    2001/06/18 12:02:10     1.60
+++ Makefile    2001/06/18 14:23:50
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 0
-EXTRAVERSION = -pa28
+EXTRAVERSION = -pa29
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
Index: arch/parisc/kernel/setup.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/setup.c,v
retrieving revision 1.82
diff -u -r1.82 setup.c
--- setup.c     2001/06/14 12:12:42     1.82
+++ setup.c     2001/06/18 14:23:50
@@ -65,6 +65,7 @@
 
 #define COMMAND_LINE_SIZE 1024
 char   saved_command_line[COMMAND_LINE_SIZE];
+char   command_line[COMMAND_LINE_SIZE];
 
 struct system_cpuinfo_parisc boot_cpu_data;
 struct cpuinfo_parisc cpu_data[NR_CPUS];
@@ -353,7 +354,8 @@
 #endif
        }
 
-       *cmdline_p = saved_command_line;
+       strcpy(command_line, saved_command_line);
+       *cmdline_p = command_line;
 }
 
 void __init dma_ops_init(void)