From: Masahiro Yamada Date: Fri, 10 May 2019 06:12:04 +0000 (+0900) Subject: kconfig: do not accept a directory for configuration output X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=commitdiff_plain;h=04d2c0bc4dc1b10c5824fa54ceee7ee3547ca880;hp=04d2c0bc4dc1b10c5824fa54ceee7ee3547ca880 kconfig: do not accept a directory for configuration output Currently, conf_write() can be called with a directory name instead of a file name. As far as I see, this can happen for menuconfig, nconfig, gconfig. If it is given with a directory path, conf_write() kindly appends getenv("KCONFIG_CONFIG"), but this ends up with hacky dir/basename handling, and screwed up in corner-cases like "what if KCONFIG_CONFIG is an absolute path?" as discussed before: https://patchwork.kernel.org/patch/9910037/ Since conf_write() is already messed up, I'd say "do not do it". Please pass a file path all the time. If a directory path is specified for the configuration output, conf_write() will simply error out. Now that the tmp file is created in the same directory as the .config, the previously reported "what if KCONFIG_CONFIG points to a different file system?" has been solved. Signed-off-by: Masahiro Yamada Cc: Nicolas Porcel Signed-off-by: Christian Lamparter ---