Re: 2.5 vi .config ; make oldconfig not working

From: Sam Ravnborg (sam@ravnborg.org)
Date: Tue Nov 05 2002 - 14:30:04 EST


On Tue, Nov 05, 2002 at 07:14:31PM +0100, Jens Axboe wrote:
> I'll write the script, just a damn shame that this feature is gone now.
> .config editing is less powerful now.
The following patch should make most garbage, such as =n, result in
# CONFIG_FOO is not set
without any user confirmation.

Roman - the code uses "//" for comments. Thats not usual kernel style.

        Sam

===== confdata.c 1.1 vs edited =====
--- 1.1/scripts/kconfig/confdata.c Wed Oct 30 02:16:44 2002
+++ edited/confdata.c Tue Nov 5 20:25:59 2002
@@ -147,14 +147,28 @@
                         }
                         switch (sym->type) {
                         case S_BOOLEAN:
- sym->def = symbol_yes.curr;
- sym->flags &= ~SYMBOL_NEW;
+ if (p[0] == 'y') {
+ sym->def = symbol_yes.curr;
+ sym->flags &= ~SYMBOL_NEW;
+ }
+ else
+ {
+ sym->def = symbol_no.curr;
+ sym->flags &= ~SYMBOL_NEW;
+ continue;
+ }
                                 break;
                         case S_TRISTATE:
                                 if (p[0] == 'm')
                                         sym->def = symbol_mod.curr;
- else
+ else if (p[0] == 'y')
                                         sym->def = symbol_yes.curr;
+ else
+ {
+ sym->def = symbol_no.curr;
+ sym->flags &= ~SYMBOL_NEW;
+ continue;
+ }
                                 sym->flags &= ~SYMBOL_NEW;
                                 break;
                         case S_STRING:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:39 EST