@@ -288,6 +288,8 @@ int conf_read_simple(const char *name, int def)
288
288
for_all_symbols (i , sym ) {
289
289
sym -> flags |= SYMBOL_CHANGED ;
290
290
sym -> flags &= ~(def_flags |SYMBOL_VALID );
291
+ if (sym_is_choice (sym ))
292
+ sym -> flags |= def_flags ;
291
293
switch (sym -> type ) {
292
294
case S_INT :
293
295
case S_HEX :
@@ -377,13 +379,13 @@ int conf_read_simple(const char *name, int def)
377
379
case mod :
378
380
if (cs -> def [def ].tri == yes ) {
379
381
conf_warning ("%s creates inconsistent choice state" , sym -> name );
382
+ cs -> flags &= ~def_flags ;
380
383
}
381
384
break ;
382
385
case yes :
383
386
if (cs -> def [def ].tri != no )
384
387
conf_warning ("override: %s changes choice state" , sym -> name );
385
388
cs -> def [def ].val = sym ;
386
- cs -> flags |= def_flags ;
387
389
break ;
388
390
}
389
391
cs -> def [def ].tri = EXPR_OR (cs -> def [def ].tri , sym -> def [def ].tri );
@@ -789,8 +791,6 @@ int conf_write(const char *name)
789
791
sym_calc_value (sym );
790
792
if (!(sym -> flags & SYMBOL_WRITE ))
791
793
goto next ;
792
- if (sym_is_choice_value (sym ) && !menu_is_visible (menu -> parent ))
793
- goto next ;
794
794
sym -> flags &= ~SYMBOL_WRITE ;
795
795
796
796
conf_write_symbol (out , sym , & kconfig_printer_cb , NULL );
@@ -1077,7 +1077,6 @@ static void randomize_choice_values(struct symbol *csym)
1077
1077
else {
1078
1078
sym -> def [S_DEF_USER ].tri = no ;
1079
1079
}
1080
- sym -> flags &= ~(SYMBOL_VALID );
1081
1080
}
1082
1081
csym -> flags |= SYMBOL_DEF_USER ;
1083
1082
/* clear VALID to get value calculated */
0 commit comments