From patchwork Fri Oct 1 05:32:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12529709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5D41C433FE for ; Fri, 1 Oct 2021 05:33:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1C0061052 for ; Fri, 1 Oct 2021 05:33:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238424AbhJAFfI (ORCPT ); Fri, 1 Oct 2021 01:35:08 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:25308 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230512AbhJAFfG (ORCPT ); Fri, 1 Oct 2021 01:35:06 -0400 Received: from grover.. (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-10.nifty.com with ESMTP id 1915WwVY000646; Fri, 1 Oct 2021 14:33:01 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 1915WwVY000646 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1633066381; bh=TY3pNDuHtjJvzRNvuIX7wXtebmfGI1zG24Lpl/V7eeA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IEKR2PDn/KdO5HXPiyrfnsW1d/OsJ+9E2cPIRgo6lH8QNAtLB9JdkqDN6UsPq2hpc UXgV2UuWlda91GTIrgWi88nbq5cV7klPmuS3UL81abvNn8ttg8YC5Ylf4XjgriiOgY ykRrnmVzg3+1l6/D8SLY2QnaGYUUpkWKKi31ZCjn9t2LLtqSH0N4rbRzFvR87umLl0 u7+w1WCigqOq50N1AIDMYpTryULAWIB/PhbgI9nRgpxcoMXp7Sg9tuaCPFEdqtI9a/ 29ejGdBKpcdMLrvVNotvQrO21G6OtL0YHefsiQcw6MDGB+zOjXSkjgFD7EtswXXf5z 9UnDNwjbyBnfA== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 06/10] kconfig: add conf_get_autoheader_name() Date: Fri, 1 Oct 2021 14:32:49 +0900 Message-Id: <20211001053253.1223316-6-masahiroy@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211001053253.1223316-1-masahiroy@kernel.org> References: <20211001053253.1223316-1-masahiroy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org For consistency with conf_get_autoconfig_name() Signed-off-by: Masahiro Yamada --- scripts/kconfig/confdata.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 78af1dd68894..2c518aaa5255 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))