aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2005-09-05 11:04:30 +0000
committerRob Landley <rob@landley.net>2005-09-05 11:04:30 +0000
commit8f991043625a1933f5086a933d92bac28316869a (patch)
treefc2c1fae50aaa37e94f1e47b68e7e50ac5c3abb5 /scripts
parentd1fa5859d60b246f5b345e921edbb86e31c41930 (diff)
downloadbusybox-8f991043625a1933f5086a933d92bac28316869a.tar.gz
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/config/confdata.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/config/confdata.c b/scripts/config/confdata.c
index 1d1b61e2b..78f3b20a7 100644
--- a/scripts/config/confdata.c
+++ b/scripts/config/confdata.c
@@ -396,21 +396,20 @@ int conf_write(const char *name)
case S_HEX:
str = sym_get_string_value(sym);
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)
fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
break;
}
case S_INT:
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)
fprintf(out_h, "#define %s %s\n", sym->name, str);
break;
}
}
- next:
if (menu->list) {
menu = menu->list;
continue;