linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: zippel@linux-m68k.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [KCONFIG] Optional choice values always get reset
Date: Sat, 12 Jul 2003 17:30:18 +1000	[thread overview]
Message-ID: <20030712073018.GA19038@gondor.apana.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

Hi:

As of 2.5.74, make oldconfig always disables existing optional choices
even if they were selected previously.  For example, if all the EICON
ISDN drivers were selected as modules, then make oldconfig will turn
them off.

Part of the problem is that the choice value itself is computed before
the SYMBOL_NEW flag is turned off.  This patch addresses that particular
problem.

Cheers,
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: p --]
[-- Type: text/plain, Size: 1889 bytes --]

Index: kernel-source-2.5/scripts/kconfig/confdata.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/scripts/kconfig/confdata.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 confdata.c
--- kernel-source-2.5/scripts/kconfig/confdata.c	17 Jun 2003 04:20:26 -0000	1.1.1.3
+++ kernel-source-2.5/scripts/kconfig/confdata.c	12 Jul 2003 07:24:35 -0000
@@ -149,7 +149,7 @@
 			sym = sym_find(line + 7);
 			if (!sym) {
 				fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 7);
-				break;
+				continue;
 			}
 			switch (sym->type) {
 			case S_TRISTATE:
@@ -197,29 +197,28 @@
 			default:
 				;
 			}
-			if (sym_is_choice_value(sym)) {
-				struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
-				switch (sym->user.tri) {
-				case mod:
-					if (cs->user.tri == yes)
-						/* warn? */;
-					break;
-				case yes:
-					if (cs->user.tri != no)
-						/* warn? */;
-					cs->user.val = sym;
-					break;
-				case no:
-					break;
-				}
-				cs->user.tri = sym->user.tri;
-			}
-			break;
-		case '\n':
 			break;
 		default:
 			continue;
 		}
+		if (sym_is_choice_value(sym)) {
+			struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
+			switch (sym->user.tri) {
+			case mod:
+				if (cs->user.tri == yes)
+					/* warn? */;
+				break;
+			case yes:
+				if (cs->user.tri != no)
+					/* warn? */;
+				cs->user.val = sym;
+				break;
+			case no:
+				break;
+			}
+			cs->user.tri = E_OR(cs->user.tri, sym->user.tri);
+			cs->flags &= ~SYMBOL_NEW;
+		}
 	}
 	fclose(in);
 
@@ -241,7 +240,6 @@
 		if (!sym_is_choice(sym))
 			continue;
 		prop = sym_get_choice_prop(sym);
-		sym->flags &= ~SYMBOL_NEW;
 		for (e = prop->expr; e; e = e->left.expr)
 			if (e->right.sym->visible != no)
 				sym->flags |= e->right.sym->flags & SYMBOL_NEW;

             reply	other threads:[~2003-07-12  7:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-12  7:30 Herbert Xu [this message]
2003-07-14 20:04 ` Roman Zippel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030712073018.GA19038@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    --subject='Re: [KCONFIG] Optional choice values always get reset' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).