From patchwork Tue Jul 4 05:52:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 115567 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1004659vqx; Mon, 3 Jul 2023 23:13:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6PfOEt/PAWPs6XpntFXJyHLTNjNsQlLuGJDBwq/7dZ6DzOghRZuX6IqR3Z895VpzRs9edk X-Received: by 2002:a05:6808:1b09:b0:3a1:de0a:9178 with SMTP id bx9-20020a0568081b0900b003a1de0a9178mr13226533oib.59.1688451187264; Mon, 03 Jul 2023 23:13:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688451187; cv=none; d=google.com; s=arc-20160816; b=qvsQhDCjVQkKIC+JxnEIQhwinnl2cRALp8DX0yW/x+I49xG0jxnIMysk66yFkrfc1X lHWo0hNXrhH1qtw6UADi8FrYF9AdIoAnV+LP/gK5Si5A61wskYfQC0e2wB70Wgok6UoU T04NLIqjOZXQqUdoKExBaD1R6xGRoG3hc4lMXD/CHosn3dUH+hle+RQK/DMcFHS4ccZj O5EXCLQmGRDdoYwhCa7CTHEFzoLGaGyxcDyE0qkVMtX9Up175Qd0jT0L/XAWn4OxmaaO KGrFax7YZwFT+ZKEB2J/1crIE6YbBy6g/Ze7ceE8fEsEUdQZJ65tJXz8NyfgxIsums7j Nxtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ZT+Waq4/7CDQDwKeT5ati3iaCZkS+/uXn2hrAuUP5S0=; fh=tmgz4bpgsVEKAsYR8+Si16fTh9XSaSUgKJNVApaNvTw=; b=mqvGyBgwcdci9uFadzf0Ka2/w5ZuZSuBAJ3l/sWkuTTq7Gw0vfe5D7nsCNagZgi2oO SPqB3j4x2+udMO5k8Yd7Yij9fNkEyU4cSTyys5aAmdEyimU73rHqJDmXiILMLIQSwDHL ovP3Lohp4bZ4u7DSV3Pgp8dLhwet1BC6q2/lyLatjtUSHYkC7+8HDYYVKF/NEzUs0YXl XRpd3CEi7HL8igBVz0FsBEfgLB9yALkyEiWiAPi64hZjWtRE+NyX48Wga4ZgW81uTXJL Z/fw4eFiRwj9klGz/J2ULfyOFkJHhNJjKxSGHXyrbMsI4pZpVB/RkZTOw76yrBNDjVat TxiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=IvzxZFWh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go5-20020a17090b03c500b002635511f8a2si10169623pjb.122.2023.07.03.23.12.52; Mon, 03 Jul 2023 23:13:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=IvzxZFWh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230099AbjGDFwu (ORCPT + 99 others); Tue, 4 Jul 2023 01:52:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbjGDFws (ORCPT ); Tue, 4 Jul 2023 01:52:48 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B762E49; Mon, 3 Jul 2023 22:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=ZT+Waq4/7CDQDwKeT5ati3iaCZkS+/uXn2hrAuUP5S0=; b=IvzxZFWh1WJNnhjNy2NfNHIS09 vup5sGYDgOMT2cY5oQES/EI+Z/+RWEcdlXJGmyjlCtSwbqKe5Cv5ZshucXYXYNoJW80U3ObJ+Nzd7 WJiEdvkRlTAXVhwsWE0dNBgX/rgGOT9wYVvWbO25Sh7LCzp7phHM3Rynty3zod/rYCphSKKA6VjNT qkJx5KDio0okE/wS3zLa65P9ADIGR5fydEg/6jAA0uPiP79brSprKJTBWsVI0CqGFVjfV5yraPegY iqp3cdkTCdm9///dPYISZ1GC4YFH6oTN8Pjb40Ctld5OBEfim88u2xvWryU3eVJo6Xhpy4v6CWpiA XEX/tRGw==; Received: from [2601:1c2:980:9ec0::2764] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qGYxz-00CFBO-0U; Tue, 04 Jul 2023 05:52:47 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Masahiro Yamada , linux-kbuild@vger.kernel.org Subject: [PATCH] kconfig: tell the kconfig symbol of the restart reason Date: Mon, 3 Jul 2023 22:52:46 -0700 Message-ID: <20230704055246.22893-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770469392469232083?= X-GMAIL-MSGID: =?utf-8?q?1770469392469232083?= When running 'make oldconfig' or 'make olddefconfig' without waiting for prompts, it can be useful to know the restart reason so that it can be fixed manually. This is usually when the prompt value is a number or a string, i.e., something other than y/m/n. Signed-off-by: Randy Dunlap Cc: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org --- Can the test for sym->name be omitted? scripts/kconfig/conf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff -- a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -652,8 +652,12 @@ static void check_conf(struct menu *menu printf("-----\n"); break; default: - if (!conf_cnt++) - printf("*\n* Restart config...\n*\n"); + if (!conf_cnt++) { + printf("*\n* Restart config...\n"); + if (sym->name) + printf("* due to symbol: %s\n", sym->name); + printf("*\n"); + } rootEntry = menu_get_parent_menu(menu); conf(rootEntry); break;