From b6f7e9f7050b9f8e5fe60d86e05c0740295a54bf Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 27 May 2019 23:37:22 +0900 Subject: 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 --- scripts/kconfig/conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts/kconfig/conf.c') 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[] = { {"oldaskconfig", no_argument, NULL, oldaskconfig}, {"oldconfig", no_argument, NULL, oldconfig}, {"syncconfig", no_argument, NULL, syncconfig}, - {"defconfig", optional_argument, NULL, defconfig}, + {"defconfig", required_argument, NULL, defconfig}, {"savedefconfig", required_argument, NULL, savedefconfig}, {"allnoconfig", no_argument, NULL, allnoconfig}, {"allyesconfig", no_argument, NULL, allyesconfig}, @@ -562,8 +562,6 @@ int main(int ac, char **av) switch (input_mode) { case defconfig: - if (!defconfig_file) - defconfig_file = conf_get_default_confname(); if (conf_read(defconfig_file)) { fprintf(stderr, "***\n" -- cgit From baa23ec860920ebf3e897c4bbb3420a88ea80ec1 Mon Sep 17 00:00:00 2001 From: Marco Ammon Date: Thu, 4 Jul 2019 12:50:41 +0200 Subject: kconfig: Fix spelling of sym_is_changable There is a spelling mistake in "changable", it is corrected to "changeable" and all call sites are updated accordingly. Signed-off-by: Marco Ammon Signed-off-by: Masahiro Yamada --- scripts/kconfig/conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/kconfig/conf.c') diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 0d4c4f3a8f29..40e16e871ae2 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -90,7 +90,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) line[0] = '\n'; line[1] = 0; - if (!sym_is_changable(sym)) { + if (!sym_is_changeable(sym)) { printf("%s\n", def); line[0] = '\n'; line[1] = 0; @@ -234,7 +234,7 @@ static int conf_choice(struct menu *menu) sym = menu->sym; is_new = !sym_has_value(sym); - if (sym_is_changable(sym)) { + if (sym_is_changeable(sym)) { conf_sym(menu); sym_calc_value(sym); switch (sym_get_tristate_value(sym)) { @@ -418,7 +418,7 @@ static void check_conf(struct menu *menu) sym = menu->sym; if (sym && !sym_has_value(sym)) { - if (sym_is_changable(sym) || + if (sym_is_changeable(sym) || (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { if (input_mode == listnewconfig) { if (sym->name) { -- cgit