svn commit: trunk/busybox/scripts/config

landley at busybox.net landley at busybox.net
Mon Sep 5 11:04:32 UTC 2005


Author: landley
Date: 2005-09-05 04:04:30 -0700 (Mon, 05 Sep 2005)
New Revision: 11329

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


Modified:
   trunk/busybox/scripts/config/confdata.c


Changeset:
Modified: trunk/busybox/scripts/config/confdata.c
===================================================================
--- trunk/busybox/scripts/config/confdata.c	2005-09-05 10:25:51 UTC (rev 11328)
+++ trunk/busybox/scripts/config/confdata.c	2005-09-05 11:04:30 UTC (rev 11329)
@@ -396,21 +396,20 @@
 			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;




More information about the busybox-cvs mailing list