summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-11-06 18:38:24 +0000
committerEric Andersen <andersen@codepoet.org>2002-11-06 18:38:24 +0000
commitf2cbe5aee419921328b4e05af3c28c499dfedca1 (patch)
tree0ad20f6095a2f46028b328028f4b5a8a4dc05dcd
parente5fc0ba9482cdecb303bc1d836d0d2695b9539ec (diff)
Recognize 'n' tristate/boolean symbol value in the .config file,
allowing more convenient manual editing of the .config file. Patch by Petr Baudis, skimmed from linux-kernel mailing list.
-rw-r--r--extra/config/confdata.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/extra/config/confdata.c b/extra/config/confdata.c
index 00e87486a..0c132a6f0 100644
--- a/extra/config/confdata.c
+++ b/extra/config/confdata.c
@@ -1,6 +1,9 @@
/*
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
* Released under the terms of the GNU GPL v2.0.
+ *
+ * Allow 'n' as a symbol value.
+ * 2002-11-05 Petr Baudis <pasky@ucw.cz>
*/
#include <ctype.h>
@@ -145,14 +148,14 @@ int conf_read(const char *name)
break;
}
switch (sym->type) {
- case S_BOOLEAN:
- sym->def = symbol_yes.curr;
- sym->flags &= ~SYMBOL_NEW;
- break;
case S_TRISTATE:
if (p[0] == 'm')
sym->def = symbol_mod.curr;
else
+ case S_BOOLEAN:
+ if (p[0] == 'n')
+ sym->def = symbol_no.curr;
+ else
sym->def = symbol_yes.curr;
sym->flags &= ~SYMBOL_NEW;
break;