From: Anthony PERARD <[email protected]> zconf_fopen() will open file in $srctree if the file isn't in $objtree. This is an issue for "auto.conf" as it could be in the source tree if it is dirty. With "auto.conf" read from the source tree, kconfig will not properly set the file associated with a CONFIG_* properly in "include/config/" and instead only touch the files that correspond to new CONFIG_* option that were not set in the "auto.conf" found in the source tree.
That might not be an issue, but it is probably better to have a populated "include/config/" directory in sync with "include/config/auto.conf". The second that read from conf_get_configname() would read ".config" from the source directory which is also not wanted in Xen. Signed-off-by: Anthony PERARD <[email protected]> --- xen/tools/kconfig/confdata.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/tools/kconfig/confdata.c b/xen/tools/kconfig/confdata.c index 4f9139d055be..805d4c3e5636 100644 --- a/xen/tools/kconfig/confdata.c +++ b/xen/tools/kconfig/confdata.c @@ -357,12 +357,17 @@ int conf_read_simple(const char *name, int def) int i, def_flags; if (name) { - in = zconf_fopen(name); + if (def == S_DEF_AUTO) { + /* only open include/config/auto.conf in objtree */ + in = fopen(name, "r"); + } else { + in = zconf_fopen(name); + } } else { struct property *prop; name = conf_get_configname(); - in = zconf_fopen(name); + in = fopen(name, "r"); if (in) goto load; sym_add_change_count(1); -- Anthony PERARD
