mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: linux-kernel@vger.kernel.org
Cc: zippel@linux-m68k.org
Subject: [PATCH] Up silly limit on .config line length
Date: Tue, 5 Nov 2002 23:38:44 +0000	[thread overview]
Message-ID: <20021105233844.J24606@flint.arm.linux.org.uk> (raw)

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


             reply	other threads:[~2002-11-05 23:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-05 23:38 Russell King [this message]
2002-11-06 13:32 ` Roman Zippel
2002-11-06 13:34   ` Russell King
2002-11-06 21:32   ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021105233844.J24606@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®