diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2021-10-01 07:32:49 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-10-11 16:13:23 +0200 |
commit | 8499f2dd57ef099290fa5411c4498bccc9c407d9 (patch) | |
tree | 6fe7bbc2a624892632609190554c6f89ec94fc20 /scripts | |
parent | kconfig: move sym_escape_string_value() to confdata.c (diff) | |
download | linux-8499f2dd57ef099290fa5411c4498bccc9c407d9.tar.xz linux-8499f2dd57ef099290fa5411c4498bccc9c407d9.zip |
kconfig: add conf_get_autoheader_name()
For consistency with conf_get_autoconfig_name()
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/confdata.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 26b39d34e2be..acf3d5a2973e 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -223,6 +223,13 @@ static const char *conf_get_autoconfig_name(void) return name ? name : "include/config/auto.conf"; } +static const char *conf_get_autoheader_name(void) +{ + char *name = getenv("KCONFIG_AUTOHEADER"); + + return name ? name : "include/generated/autoconf.h"; +} + static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) { char *p2; @@ -1092,9 +1099,7 @@ int conf_write_autoconf(int overwrite) fclose(out); fclose(out_h); - name = getenv("KCONFIG_AUTOHEADER"); - if (!name) - name = "include/generated/autoconf.h"; + name = conf_get_autoheader_name(); if (make_parent_dir(name)) return 1; if (rename(".tmpconfig.h", name)) |