From f2cbe5aee419921328b4e05af3c28c499dfedca1 Mon Sep 17 00:00:00 2001
From: Eric Andersen <andersen@codepoet.org>
Date: Wed, 6 Nov 2002 18:38:24 +0000
Subject: 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.

---
 extra/config/confdata.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'extra')

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;
-- 
cgit v1.2.3