Skip to content

Commit

Permalink
kconfig: add conf_get_autoheader_name()
Browse files Browse the repository at this point in the history
For consistency with conf_get_autoconfig_name()

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
Masahiro Yamada committed Oct 11, 2021
1 parent 80f7bc7 commit 8499f2d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 8499f2d

Please sign in to comment.