Skip to content

Commit 911a91c

Browse files
committed
kconfig: rename silentoldconfig to syncconfig
As commit cedd55d ("kconfig: Remove silentoldconfig from help and docs; fix kconfig/conf's help") mentioned, 'silentoldconfig' is a historical misnomer. That commit removed it from help and docs since it is an internal interface. If so, it should be allowed to rename it to something more intuitive. 'syncconfig' is the one I came up with because it updates the .config if necessary, then synchronize include/generated/autoconf.h and include/config/* with it. You should not manually invoke 'silentoldcofig'. Display warning if used in case existing scripts are doing wrong. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>
1 parent 81d2bc2 commit 911a91c

5 files changed

Lines changed: 23 additions & 16 deletions

File tree

‎Documentation/kbuild/kconfig.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Examples:
119119
15% of tristates will be set to 'y', 15% to 'm', 70% to 'n'
120120

121121
______________________________________________________________________
122-
Environment variables for 'silentoldconfig'
122+
Environment variables for 'syncconfig'
123123

124124
KCONFIG_NOSILENTUPDATE
125125
--------------------------------------------------

‎Documentation/networking/i40e.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Enabling the driver
3232
The driver is enabled via the standard kernel configuration system,
3333
using the make command:
3434

35-
Make oldconfig/silentoldconfig/menuconfig/etc.
35+
make config/oldconfig/menuconfig/etc.
3636

3737
The driver is located in the menu structure at:
3838

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
588588
# include/generated/ and include/config/. Update them if .config is newer than
589589
# include/config/auto.conf (which mirrors .config).
590590
include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
591-
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
591+
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
592592
else
593593
# external modules needs include/generated/autoconf.h and include/config/auto.conf
594594
# but do not care if they are up-to-date. Use auto.conf to trigger the test

‎scripts/kconfig/Makefile‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Kernel configuration targets
44
# These targets are used from top-level makefile
55

6-
PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \
6+
PHONY += xconfig gconfig menuconfig config syncconfig update-po-config \
77
localmodconfig localyesconfig
88

99
ifdef KBUILD_KCONFIG
@@ -36,7 +36,7 @@ nconfig: $(obj)/nconf
3636

3737
# This has become an internal implementation detail and is now deprecated
3838
# for external use.
39-
silentoldconfig: $(obj)/conf
39+
syncconfig: $(obj)/conf
4040
$(Q)mkdir -p include/config include/generated
4141
$(Q)test -e include/generated/autoksyms.h || \
4242
touch include/generated/autoksyms.h
@@ -88,7 +88,7 @@ PHONY += $(simple-targets)
8888
$(simple-targets): $(obj)/conf
8989
$< $(silent) --$@ $(Kconfig)
9090

91-
PHONY += oldnoconfig savedefconfig defconfig
91+
PHONY += oldnoconfig silentoldconfig savedefconfig defconfig
9292

9393
# oldnoconfig is an alias of olddefconfig, because people already are dependent
9494
# on its behavior (sets new symbols to their default value but not 'n') with the
@@ -97,6 +97,13 @@ oldnoconfig: olddefconfig
9797
@echo " WARNING: \"oldnoconfig\" target will be removed after Linux 4.19"
9898
@echo " Please use \"olddefconfig\" instead, which is an alias."
9999

100+
# We do not expect manual invokcation of "silentoldcofig" (or "syncconfig").
101+
silentoldconfig: syncconfig
102+
@echo " WARNING: \"silentoldconfig\" has been renamed to \"syncconfig\""
103+
@echo " and is now an internal implementation detail."
104+
@echo " What you want is probably \"oldconfig\"."
105+
@echo " \"silentoldconfig\" will be removed after Linux 4.19"
106+
100107
savedefconfig: $(obj)/conf
101108
$< $(silent) --$@=defconfig $(Kconfig)
102109

‎scripts/kconfig/conf.c‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static void check_conf(struct menu *menu);
2323

2424
enum input_mode {
2525
oldaskconfig,
26-
silentoldconfig,
26+
syncconfig,
2727
oldconfig,
2828
allnoconfig,
2929
allyesconfig,
@@ -100,7 +100,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
100100

101101
switch (input_mode) {
102102
case oldconfig:
103-
case silentoldconfig:
103+
case syncconfig:
104104
if (sym_has_value(sym)) {
105105
printf("%s\n", def);
106106
return 0;
@@ -293,7 +293,7 @@ static int conf_choice(struct menu *menu)
293293
printf("[1-%d?]: ", cnt);
294294
switch (input_mode) {
295295
case oldconfig:
296-
case silentoldconfig:
296+
case syncconfig:
297297
if (!is_new) {
298298
cnt = def;
299299
printf("%d\n", cnt);
@@ -441,7 +441,7 @@ static void check_conf(struct menu *menu)
441441
static struct option long_opts[] = {
442442
{"oldaskconfig", no_argument, NULL, oldaskconfig},
443443
{"oldconfig", no_argument, NULL, oldconfig},
444-
{"silentoldconfig", no_argument, NULL, silentoldconfig},
444+
{"syncconfig", no_argument, NULL, syncconfig},
445445
{"defconfig", optional_argument, NULL, defconfig},
446446
{"savedefconfig", required_argument, NULL, savedefconfig},
447447
{"allnoconfig", no_argument, NULL, allnoconfig},
@@ -468,8 +468,8 @@ static void conf_usage(const char *progname)
468468
printf(" --listnewconfig List new options\n");
469469
printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
470470
printf(" --oldconfig Update a configuration using a provided .config as base\n");
471-
printf(" --silentoldconfig Similar to oldconfig but generates configuration in\n"
472-
" include/{generated/,config/} (oldconfig used to be more verbose)\n");
471+
printf(" --syncconfig Similar to oldconfig but generates configuration in\n"
472+
" include/{generated/,config/}\n");
473473
printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n");
474474
printf(" --oldnoconfig An alias of olddefconfig\n");
475475
printf(" --defconfig <file> New config with default defined in <file>\n");
@@ -501,7 +501,7 @@ int main(int ac, char **av)
501501
}
502502
input_mode = (enum input_mode)opt;
503503
switch (opt) {
504-
case silentoldconfig:
504+
case syncconfig:
505505
sync_kconfig = 1;
506506
break;
507507
case defconfig:
@@ -583,7 +583,7 @@ int main(int ac, char **av)
583583
}
584584
break;
585585
case savedefconfig:
586-
case silentoldconfig:
586+
case syncconfig:
587587
case oldaskconfig:
588588
case oldconfig:
589589
case listnewconfig:
@@ -667,7 +667,7 @@ int main(int ac, char **av)
667667
/* fall through */
668668
case oldconfig:
669669
case listnewconfig:
670-
case silentoldconfig:
670+
case syncconfig:
671671
/* Update until a loop caused no more changes */
672672
do {
673673
conf_cnt = 0;
@@ -680,7 +680,7 @@ int main(int ac, char **av)
680680
}
681681

682682
if (sync_kconfig) {
683-
/* silentoldconfig is used during the build so we shall update autoconf.
683+
/* syncconfig is used during the build so we shall update autoconf.
684684
* All other commands are only used to generate a config.
685685
*/
686686
if (conf_get_changed() && conf_write(NULL)) {

0 commit comments

Comments
 (0)