[PATCH] Up silly limit on .config line length

From: Russell King (rmk@arm.linux.org.uk)
Date: Tue Nov 05 2002 - 18:38:44 EST


kconfig brought in a bug whereby no .config line can be longer than 128
characters. This causes a problem since it is quite common to have
.config lines longer than this on ARM, especially when they contain the
default kernel command line, like:

CONFIG_CMDLINE="console=ttySA0,38400n8 cpufreq=221200 rw root=/dev/ram0 mtdparts=sa1100:512K(boot),1M(kernel),2560K(initrd),4M("

The effect of this bug can be seen above; in this case it has chopped
off the parameters that allow this machine to boot; the missing parameters
should be:

 "root) load_ramdisk=1 prompt_ramdisk=0 mem=32M noinitrd initrd=0xc0800000,3M"

I believe that this arbitary limit should be eliminated by some method.
However, as a "get you working" patch with a new arbitary limit of 1024
characters:

--- linux/scripts/kconfig/confdata.c Tue Nov 5 23:24:42 2002
+++ linux-sa1100/scripts/kconfig/confdata.c Tue Nov 5 23:28:57 2002
@@ -61,7 +61,7 @@
 int conf_read(const char *name)
 {
         FILE *in = NULL;
- char line[128];
+ char line[1024];
         char *p, *p2;
         int lineno = 0;
         struct symbol *sym;
@@ -105,7 +105,7 @@
                 }
         }
 
- while (fgets(line, 128, in)) {
+ while (fgets(line, sizeof(line), in)) {
                 lineno++;
                 switch (line[0]) {
                 case '#':

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:40 EST