From ec0b482e9fd27cb994b30e0f1b8a4d39a85735cc Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 30 Jun 2016 20:41:07 -0500 Subject: Fix option parsing infrastructure bug. In main.c: used adjusted string with placeholers for removed options (so flag values don't move based on config, allowing FORCE_FLAGS to work). In scripts/mkflags.c: test was wrong, a bare longopt never matches a single letter command, but it was treated as always matching when comparing allyesconfig vs current config to determine which options were disabled, so there was a corner case that got the flag values wrong. --- scripts/mkflags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/mkflags.c') diff --git a/scripts/mkflags.c b/scripts/mkflags.c index da3b2f9b..8b3d0aa3 100644 --- a/scripts/mkflags.c +++ b/scripts/mkflags.c @@ -194,7 +194,7 @@ int main(int argc, char *argv[]) } // Output normal flag macro } else if (aflist->command) { - if (flist && (!flist->command || *aflist->command == *flist->command)) { + if (flist && flist->command && *aflist->command == *flist->command) { if (aflist->command) sprintf(out, "#define FLAG_%c (1%s<<%d)\n", *aflist->command, llstr, bit); -- cgit v1.2.3