From patchwork Tue Feb 6 00:34:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10202099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 76BFC60134 for ; Tue, 6 Feb 2018 00:39:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66B6228947 for ; Tue, 6 Feb 2018 00:39:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B6CA28956; Tue, 6 Feb 2018 00:39:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 085C928947 for ; Tue, 6 Feb 2018 00:39:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752628AbeBFAjs (ORCPT ); Mon, 5 Feb 2018 19:39:48 -0500 Received: from conuserg-07.nifty.com ([210.131.2.74]:40211 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752412AbeBFAiH (ORCPT ); Mon, 5 Feb 2018 19:38:07 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-07.nifty.com with ESMTP id w160ZHAi011351; Tue, 6 Feb 2018 09:35:20 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w160ZHAi011351 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1517877321; bh=bLojHb0MdVijoOprmBRkaKTU1H/92xNDhc4zozTi0o8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JQ0+PpGvkB1YVC1o0mBV5cyxkFVcbWJ6DVjn4Grnav8lE7wbF2I3HCo6ro+7CIg/h 78bm8UCZ//NHqmejijd9o1c3ZT6JZOSx50SghXnu2Ds7oc2+um0K+c8kPQo6snPTwY skT+u0XBKiYmtsneNfy0nx5hMJquLXxKxheH1QmETp/y5AER9ErZC/9RXxZ71S7Fxv kSQxQw094haJfXf782kJhsr0QhFrdk/MaqgbfPiQSsLrzmdBGLDDEhWdNXSLiXbVNv 4fXlYz1IajtZnR/+1mGGE1U5aog9gcXNuYcSAdzxkMarIV4jCCeeOHksl7ktgCxizN krOE48G0v4J8g== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Greg Kroah-Hartman , Andrew Morton , Nicolas Pitre , "Luis R . Rodriguez" , Randy Dunlap , Ulf Magnusson , Sam Ravnborg , Michal Marek , Linus Torvalds , Masahiro Yamada , linux-kernel@vger.kernel.org, Marc Herbert Subject: [PATCH 03/14] kconfig: show '?' prompt even if no help text is available Date: Tue, 6 Feb 2018 09:34:43 +0900 Message-Id: <1517877294-4826-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517877294-4826-1-git-send-email-yamada.masahiro@socionext.com> References: <1517877294-4826-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 'make config', 'make oldconfig', etc. always receive '?' as a valid input and show useful information even if no help text is available. ------------------------>8------------------------ foo (FOO) [N/y] (NEW) ? There is no help available for this option. Symbol: FOO [=n] Type : bool Prompt: foo Defined at Kconfig:1 ------------------------>8------------------------ However, '?' is not shown in the prompt if its help text is missing. Let's show '?' all the time so that the prompt and the behavior match. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- scripts/kconfig/conf.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 90a76aa2..d346642 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -201,9 +201,7 @@ static int conf_sym(struct menu *menu) printf("/m"); if (oldval != yes && sym_tristate_within_range(sym, yes)) printf("/y"); - if (menu_has_help(menu)) - printf("/?"); - printf("] "); + printf("/?] "); if (!conf_askvalue(sym, sym_get_string_value(sym))) return 0; strip(line); @@ -305,10 +303,7 @@ static int conf_choice(struct menu *menu) printf("[1]: 1\n"); goto conf_childs; } - printf("[1-%d", cnt); - if (menu_has_help(menu)) - printf("?"); - printf("]: "); + printf("[1-%d?]: ", cnt); switch (input_mode) { case oldconfig: case silentoldconfig: