Up silly limit on .config line length
PATCH 1/1 Up silly limit on .config line length
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:
scripts/kconfig/confdata.c +2 -2
@@ -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 '#' :
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Hi,
Quoted 3 lines · Russell King
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:
I was already wondering, how much I should allow. :) But I'd rather set an arbitrary limit (and warn) than allowing an arbitrary long string.
bye, Roman
Quoted 8 lines · Roman Zippel
Quoted 3 lines · Russell King
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:
I was already wondering, how much I should allow. :) But I'd rather set an arbitrary limit (and warn) than allowing an arbitrary long string.
That'd also work, but note that stderr/stdout messages are very easily missed when using menuconfig.
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Quoted 4 lines · Roman Zippel
I was already wondering, how much I should allow. :) But I'd rather set an arbitrary limit (and warn) than allowing an arbitrary long string.
Since this has an unknown effect it should give an error, not just a warning.
In the case raised by Russell an error would have been better, he would never try to boot the kernel in that case.
Sam