Skip to content

Commit

Permalink
kconfig: require an exact match for "is not set" to disable CONFIG op…
Browse files Browse the repository at this point in the history
…tion

Currently, any string starting "is not set" disables a CONFIG option.

For example, "# CONFIG_FOO is not settled down" is accepted as valid
input, functioning the same as "# CONFIG_FOO is not set". It is a
long-standing oddity.

Check the line against the exact pattern "is not set".

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
Masahiro Yamada committed Nov 28, 2023
1 parent 9925d6b commit 4aced3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ int conf_read_simple(const char *name, int def)
if (!p)
continue;
*p++ = 0;
if (strncmp(p, "is not set", 10))
if (strcmp(p, "is not set"))
continue;

val = "n";
Expand Down

0 comments on commit 4aced3e

Please sign in to comment.