summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-05-27 06:37:22 -0800
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-06-08 22:08:18 -0800
commitb6f7e9f7050b9f8e5fe60d86e05c0740295a54bf (patch)
tree45b9f59d4425fdfc8f8e2f673831d521bc605909 /scripts/kconfig
parente0a2668665a5f59e210f09385cd2d29833e5f9fa (diff)
downloadlinux-stable-b6f7e9f7050b9f8e5fe60d86e05c0740295a54bf.tar.gz
linux-stable-b6f7e9f7050b9f8e5fe60d86e05c0740295a54bf.tar.bz2
linux-stable-b6f7e9f7050b9f8e5fe60d86e05c0740295a54bf.tar.xz
linux-stable-b6f7e9f7050b9f8e5fe60d86e05c0740295a54bf.zip
kconfig: require the argument of --defconfig
Currently, the argument for --defconfig is optional. If the argument is not passed, the hard-coded default arch/$(ARCH)/defconfig is used. It no longer happens in Linux since the last users of the default are gone by the following commits: - Commit f3e20ad67b4c ("s390: move arch/s390/defconfig to arch/s390/configs/defconfig") - Commit 986a13769c4b ("alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig") I want to kill the Linux-specific directory path embedded in the Kconfig binary. The --savedefconfig (reverse operation of --defconfig) requires an argument, so it should not hurt to do likewise for --defconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/conf.c4
-rw-r--r--scripts/kconfig/confdata.c17
-rw-r--r--scripts/kconfig/lkc.h1
3 files changed, 1 insertions, 21 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index ef3678c24bab..0d4c4f3a8f29 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -451,7 +451,7 @@ static struct option long_opts[] = {
451 {"oldaskconfig", no_argument, NULL, oldaskconfig}, 451 {"oldaskconfig", no_argument, NULL, oldaskconfig},
452 {"oldconfig", no_argument, NULL, oldconfig}, 452 {"oldconfig", no_argument, NULL, oldconfig},
453 {"syncconfig", no_argument, NULL, syncconfig}, 453 {"syncconfig", no_argument, NULL, syncconfig},
454 {"defconfig", optional_argument, NULL, defconfig}, 454 {"defconfig", required_argument, NULL, defconfig},
455 {"savedefconfig", required_argument, NULL, savedefconfig}, 455 {"savedefconfig", required_argument, NULL, savedefconfig},
456 {"allnoconfig", no_argument, NULL, allnoconfig}, 456 {"allnoconfig", no_argument, NULL, allnoconfig},
457 {"allyesconfig", no_argument, NULL, allyesconfig}, 457 {"allyesconfig", no_argument, NULL, allyesconfig},
@@ -562,8 +562,6 @@ int main(int ac, char **av)
562 562
563 switch (input_mode) { 563 switch (input_mode) {
564 case defconfig: 564 case defconfig:
565 if (!defconfig_file)
566 defconfig_file = conf_get_default_confname();
567 if (conf_read(defconfig_file)) { 565 if (conf_read(defconfig_file)) {
568 fprintf(stderr, 566 fprintf(stderr,
569 "***\n" 567 "***\n"
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 6006154d36bd..18e8051d89d7 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -177,8 +177,6 @@ static void conf_message(const char *fmt, ...)
177static const char *conf_filename; 177static const char *conf_filename;
178static int conf_lineno, conf_warnings; 178static int conf_lineno, conf_warnings;
179 179
180const char conf_defname[] = "arch/$(ARCH)/defconfig";
181
182static void conf_warning(const char *fmt, ...) 180static void conf_warning(const char *fmt, ...)
183{ 181{
184 va_list ap; 182 va_list ap;
@@ -233,21 +231,6 @@ static const char *conf_get_autoconfig_name(void)
233 return name ? name : "include/config/auto.conf"; 231 return name ? name : "include/config/auto.conf";
234} 232}
235 233
236char *conf_get_default_confname(void)
237{
238 static char fullname[PATH_MAX+1];
239 char *env, *name;
240
241 name = expand_string(conf_defname);
242 env = getenv(SRCTREE);
243 if (env) {
244 snprintf(fullname, sizeof(fullname), "%s/%s", env, name);
245 if (is_present(fullname))
246 return fullname;
247 }
248 return name;
249}
250
251static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) 234static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
252{ 235{
253 char *p2; 236 char *p2;
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index cbc7658ee27d..4fb16f316626 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -49,7 +49,6 @@ const char *zconf_curname(void);
49 49
50/* confdata.c */ 50/* confdata.c */
51const char *conf_get_configname(void); 51const char *conf_get_configname(void);
52char *conf_get_default_confname(void);
53void sym_set_change_count(int count); 52void sym_set_change_count(int count);
54void sym_add_change_count(int count); 53void sym_add_change_count(int count);
55bool conf_set_all_new_symbols(enum conf_def_mode mode); 54bool conf_set_all_new_symbols(enum conf_def_mode mode);