From 5f22436f6067cfcc4be2d999936d2729103745b8 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 26 Jul 2026 10:27:06 -0500 Subject: [PATCH] Fix oldconfig (wasn't properly parsing "is not set" lines) and accept set but empty KCONFIG_ALLCONFIG. --- scripts/kconfig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/kconfig.c b/scripts/kconfig.c index dbca339e..28e1c2be 100644 --- a/scripts/kconfig.c +++ b/scripts/kconfig.c @@ -260,8 +260,8 @@ void read_dotconfig(struct kconfig *klist, FILE *fp) for (; (line = getrimline(fp)); free(line)) { // kconfig has a crazy way to say SYMBOL=n - if (!strncmp(line, "# CONFIG_", 9) && (s = strchr(line, ' ')) - && !strcmp(s, " is not set\n")) + if (!strncmp(line, "# CONFIG_", 9) && (s = strchr(line+9, ' ')) + && !strcmp(s, " is not set")) { *s = 0; name = line+9; @@ -304,7 +304,7 @@ void options(char *opt) return; } - if ((ss = getenv("KCONFIG_ALLCONFIG"))) { + if ((ss = getenv("KCONFIG_ALLCONFIG")) && *ss) { if (!(fp = fopen(ss, "r"))) exit(dprintf(2, "bad KCONFIG_ALLCONFIG=%s\n", ss)|1); read_dotconfig(kc, fp); -- 2.39.5