The previous commit left confdata writing out:
CONFIG_NUMERIC_CONSTANT= And on reading it back in, it would complain that '' was an invalid value for that field. I.E. "make allnoconfig && make" worked fine, but "make allnoconfig && make menuconfig" barfed reading in the config file. So now I have it write out "0" as the blank value. (It's initialized to the default value when the menu becomes visible anyway; I checked.) That seems to work.
This commit is contained in:
parent
d1fa5859d6
commit
8f99104362
@ -396,21 +396,20 @@ int conf_write(const char *name)
|
|||||||
case S_HEX:
|
case S_HEX:
|
||||||
str = sym_get_string_value(sym);
|
str = sym_get_string_value(sym);
|
||||||
if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
|
if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
|
||||||
fprintf(out, "%s=%s\n", sym->name, str);
|
fprintf(out, "%s=%s\n", sym->name, *str ? str : "0");
|
||||||
if (out_h)
|
if (out_h)
|
||||||
fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
|
fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case S_INT:
|
case S_INT:
|
||||||
str = sym_get_string_value(sym);
|
str = sym_get_string_value(sym);
|
||||||
fprintf(out, "%s=%s\n", sym->name, str);
|
fprintf(out, "%s=%s\n", sym->name, *str ? str : "0");
|
||||||
if (out_h)
|
if (out_h)
|
||||||
fprintf(out_h, "#define %s %s\n", sym->name, str);
|
fprintf(out_h, "#define %s %s\n", sym->name, str);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
next:
|
|
||||||
if (menu->list) {
|
if (menu->list) {
|
||||||
menu = menu->list;
|
menu = menu->list;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user