[KCONFIG] Optional choice values always get reset
diff mbox series

Message ID 20030712073018.GA19038@gondor.apana.org.au
State New, archived
Headers show
Series
  • [KCONFIG] Optional choice values always get reset
Related show

Commit Message

Herbert Xu July 12, 2003, 7:30 a.m. UTC
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,

Comments

Roman Zippel July 14, 2003, 8:04 p.m. UTC | #1
Hi,

On Sat, 12 Jul 2003, Herbert Xu wrote:

> 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.

Thanks for the patch, I applied it with some small modifications, as there 
was a small problem left.

bye, Roman

-
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/

Patch
diff mbox series

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;