[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH v8 36/47] RFC, no-VPATH: Kconfig: only ready auto.conf from objtree


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 25 Nov 2021 13:39:55 +0000
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>
  • Delivery-date: Thu, 25 Nov 2021 13:47:17 +0000
  • Ironport-data: A9a23:hqhjF6NZLv2nxJLvrR1qkMFynXyQoLVcMsEvi/4bfWQNrUp23jAEy zYXWT+GMv6ONjD3KYwlYNi//UwFsJOByoBjGgto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdpJYz/uUGuCJQUNUjMlkfZKhTr6bUsxNbVU8En540Eg+w7RRbrNA2rBVPSvc4 bsenOWHULOV82Yc3rU8sv/rRLtH5ZweiRtA1rAMTakjUGz2zhH5OKk3N6CpR0YUd6EPdgKMq 0Qv+5nilo/R109F5tpICd8XeGVSKlLZFVDmZna7x8FOK/WNz8A/+v9TCRYSVatYoyfRjt9S1 spkiYChcQU7PoDNwP4MChYNRkmSPYUekFPGCX22sMjVxEzaaXr8hf5pCSnaP6VBpLwxWzsXs 6VFdnZdNXhvhMrvqF6/YuBqmsQkKtitJI4Fs2ts5TrYEewnUdbIRKCiCdpwgWdu358RRa62i 8wxQgI+VDHGezB1a3wQLJlnmOCTmHPdfGgNwL6SjfVuuDWCpOBr65DmOcDZfdGiTsxPkkGV4 GnB+gzRCxcGNNuZ2Hyd/2ilnOPnkibyWYZUH7q9ntZ6jVvWymENBRk+UVqgveL/mkO4Q8hYK UEf5mwpt6dayaCwZoCjBVvi+ifC50NCHYoLewEn1O2T4riM8gm6GHctciJQUN40tOI3HS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RDPopy1ke3GJfAVKukIirtNoXT9N3PzdTZLr/PzPySRA PWhzTok7FnVKLDJS/khqINrtpcUacz3DLDtnBmHGuM5JJBUC4VgU+PqrDQNJ+MnFLTT0iBhGMx +oIRbQSgzArtPtobuOllAs27BysTRkdbyDocTMiMPT2F3XpCYE7tELQOv4iBu2ctFmn3hJqR4N Jl/bcOpQoddsY4sfRPD7SNHZnHEEFxviE2c6jQ/L3A9i89hGLILTsfP/n26hDzFRJ/vVwoM+C/ GANas4ZRAZLiEJ6etKX6h0UT
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Anthony PERARD <anthony.perard@xxxxxxxxx>

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 <anthony.perard@xxxxxxxxxx>
---
 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.