aboutsummaryrefslogtreecommitdiff
path: root/scripts/config/confdata.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-07-15 06:01:05 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-07-15 06:01:05 +0000
commit8d067d680796f811a61decb8bbd6f63bf05c1f41 (patch)
treebde5459d496b1afc91b7d4a261b66252a47ca414 /scripts/config/confdata.c
parent788bdae00dee03a410144b638393478b68c3a063 (diff)
downloadbusybox-w32-8d067d680796f811a61decb8bbd6f63bf05c1f41.tar.gz
busybox-w32-8d067d680796f811a61decb8bbd6f63bf05c1f41.tar.bz2
busybox-w32-8d067d680796f811a61decb8bbd6f63bf05c1f41.zip
Peter Kjellerstedt at axis.com writes:
Hello, the attached patch should bring extra/config in line with the Linux 2.6.7 sources. The following are the commit messages for the respective files from the Linux bk-repository: checklist.c: * fix menuconfig choice item help display confdata.c: * config: choice fix * kconfig: don't rename target dir when saving config expr.c, expr.h: * config: disable debug prints mconf.c: * fix menuconfig choice item help display menu.c: * Kconfig: use select statements symbol.c: * config: choice fix * Avoid bogus warning about recursive dependencies * c99 struct initialiser conversions textbox.c: * janitor: don't init statics to 0 util.c: * fix lxdialog behaviour //Peter git-svn-id: svn://busybox.net/trunk/busybox@8944 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'scripts/config/confdata.c')
-rw-r--r--scripts/config/confdata.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/config/confdata.c b/scripts/config/confdata.c
index c46aea81d..fd3a345e2 100644
--- a/scripts/config/confdata.c
+++ b/scripts/config/confdata.c
@@ -225,6 +225,8 @@ int conf_read(const char *name)
225 } 225 }
226 fclose(in); 226 fclose(in);
227 227
228 if (modules_sym)
229 sym_calc_value(modules_sym);
228 for_all_symbols(i, sym) { 230 for_all_symbols(i, sym) {
229 sym_calc_value(sym); 231 sym_calc_value(sym);
230 if (sym_has_value(sym) && !sym_is_choice_value(sym)) { 232 if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
@@ -265,8 +267,14 @@ int conf_write(const char *name)
265 267
266 dirname[0] = 0; 268 dirname[0] = 0;
267 if (name && name[0]) { 269 if (name && name[0]) {
268 char *slash = strrchr(name, '/'); 270 struct stat st;
269 if (slash) { 271 char *slash;
272
273 if (!stat(name, &st) && S_ISDIR(st.st_mode)) {
274 strcpy(dirname, name);
275 strcat(dirname, "/");
276 basename = conf_def_filename;
277 } else if ((slash = strrchr(name, '/'))) {
270 int size = slash - name + 1; 278 int size = slash - name + 1;
271 memcpy(dirname, name, size); 279 memcpy(dirname, name, size);
272 dirname[size] = 0; 280 dirname[size] = 0;