diff options
author | Eric Andersen | 2004-07-15 06:01:05 +0000 |
---|---|---|
committer | Eric Andersen | 2004-07-15 06:01:05 +0000 |
commit | 837f058fb307e0bcf7b9ad4f02a44ea3047f427e (patch) | |
tree | bde5459d496b1afc91b7d4a261b66252a47ca414 /scripts/config/confdata.c | |
parent | 449f2bca967dc4682a52487fe4a53f13c3623002 (diff) | |
download | busybox-837f058fb307e0bcf7b9ad4f02a44ea3047f427e.zip busybox-837f058fb307e0bcf7b9ad4f02a44ea3047f427e.tar.gz |
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
Diffstat (limited to 'scripts/config/confdata.c')
-rw-r--r-- | scripts/config/confdata.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/config/confdata.c b/scripts/config/confdata.c index c46aea8..fd3a345 100644 --- a/scripts/config/confdata.c +++ b/scripts/config/confdata.c @@ -225,6 +225,8 @@ int conf_read(const char *name) } fclose(in); + if (modules_sym) + sym_calc_value(modules_sym); for_all_symbols(i, sym) { sym_calc_value(sym); if (sym_has_value(sym) && !sym_is_choice_value(sym)) { @@ -265,8 +267,14 @@ int conf_write(const char *name) dirname[0] = 0; if (name && name[0]) { - char *slash = strrchr(name, '/'); - if (slash) { + struct stat st; + char *slash; + + if (!stat(name, &st) && S_ISDIR(st.st_mode)) { + strcpy(dirname, name); + strcat(dirname, "/"); + basename = conf_def_filename; + } else if ((slash = strrchr(name, '/'))) { int size = slash - name + 1; memcpy(dirname, name, size); dirname[size] = 0; |