Skip to content

Commit a314f52

Browse files
committed
kconfig: fix file name in warnings when loading KCONFIG_DEFCONFIG_LIST
Most 'make *config' commands use .config as the base configuration file. When .config does not exist, Kconfig tries to load a file listed in KCONFIG_DEFCONFIG_LIST instead. However, since commit b75b0a8 ("kconfig: change defconfig_list option to environment variable"), warning messages have displayed an incorrect file name in such cases. Below is a demonstration using Debian Trixie. While loading /boot/config-6.12.9-amd64, the warning messages incorrectly show .config as the file name. With this commit, the correct file name is displayed in warnings. [Before] $ rm -f .config $ make config # # using defaults found in /boot/config-6.12.9-amd64 # .config:6804:warning: symbol value 'm' invalid for FB_BACKLIGHT .config:9895:warning: symbol value 'm' invalid for ANDROID_BINDER_IPC [After] $ rm -f .config $ make config # # using defaults found in /boot/config-6.12.9-amd64 # /boot/config-6.12.9-amd64:6804:warning: symbol value 'm' invalid for FB_BACKLIGHT /boot/config-6.12.9-amd64:9895:warning: symbol value 'm' invalid for ANDROID_BINDER_IPC Fixes: b75b0a8 ("kconfig: change defconfig_list option to environment variable") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent a23d4c2 commit a314f52

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/kconfig/confdata.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,12 @@ int conf_read_simple(const char *name, int def)
360360

361361
*p = '\0';
362362

363-
in = zconf_fopen(env);
363+
name = env;
364+
365+
in = zconf_fopen(name);
364366
if (in) {
365367
conf_message("using defaults found in %s",
366-
env);
368+
name);
367369
goto load;
368370
}
369371

0 commit comments

Comments
 (0)