Browse Source

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.

Eric Andersen 21 years ago
parent
commit
f2cbe5aee4
1 changed files with 7 additions and 4 deletions
  1. 7 4
      extra/config/confdata.c

+ 7 - 4
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;