Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17942226ybl; Thu, 2 Jan 2020 15:15:44 -0800 (PST) X-Google-Smtp-Source: APXvYqzPDlhNQFbrthr8chUi2hKg1+R5/W+3SuiaQ0FSzUfcQwmp5EIagNfYKiGXYCtbCp/JdLN4 X-Received: by 2002:a05:6830:10f:: with SMTP id i15mr96163204otp.199.1578006944035; Thu, 02 Jan 2020 15:15:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006944; cv=none; d=google.com; s=arc-20160816; b=Nnczdh40zkfmJmpzRP7dUAIDtiheFu4WZVaENI7OLUXKdSihQhzIftSw/z8YHF+c6J HnZN/pm/dMMomrySyjaZTmkbuqLkldEBV0z73kUeJjQD/TUF+eUYT2D9IyOARtYJ6aCe LUSE8nLn+yZO4g35jkGH/DVJ7pR+eCJ3439H0GARrknZrx+OgkYTUmdhwLCBb0JRNc+I w4tbaKJffIXyXuRFD7HkapY/zDD3+ohQVJt9g3K6bDF8UryKN4NJC0Iao/DZzW3OPxAH L1t5/U/Djb4BnzBhk+C2azyM/fiT9nRH9jaj6oXZHepSt3c8P2FSHzVz/o2Ulr96THH+ GgQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=8XxaXjSkhsNEq88yHyI55+nl1NneR/5BQXJWdBH8eks=; b=iz7Ot/Njq7vW/+IXyDhaFFOrnvkfeVR/hXb0MyiZtJ5saMVD4x9dTHeCrjCtbvOHZv Sb4wQb7Q3Myf+zxOhZOGN6RrgTYTCK8xP2UURtmbeCe2C9Us47WOanLSnWiFzzDKRAW4 O1BvH69gfkXnLDajbRXMOnp5uEitVlTa19nfO8AEPGnLpuTjBs83U1/5S1ek7rSRIhDl Pnpb28ijA31Ld1gF9zqoPsL6OfXeMEOlIqWFtYb6qEAs63T8pXk3P/Hkb0uZwMDXrn6w PzVmmF2YdkmVKTIz4T+FWjRoy5zLNipV1lNdEU0shdbh6a9slv1NlElSNXdQkDgOf+e3 Y7PA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v26si30140816otj.0.2020.01.02.15.15.32; Thu, 02 Jan 2020 15:15:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727146AbgABXOF (ORCPT + 99 others); Thu, 2 Jan 2020 18:14:05 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:36011 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbgABXOE (ORCPT ); Thu, 2 Jan 2020 18:14:04 -0500 Received: by mail-qk1-f194.google.com with SMTP id a203so32914818qkc.3; Thu, 02 Jan 2020 15:14:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8XxaXjSkhsNEq88yHyI55+nl1NneR/5BQXJWdBH8eks=; b=aPCcQuVcTJ9C0GvET70tfVOO52fdogtt45Ti/AlGSMA/Si32M5he5y/389IQx25+sl DIUfwMsTINLOCS8A6MrWm+q5kfq3zBCcdVHfsL5m6E68y2dX5ifxy7I0UQ23+KB/67Kk 7gDodjDv9gzWpDaPPhWqnI0qTbXO1i/qWGtX3fobsFsuQSmtD10hr/l07NSM3Kkjczsk yCjhjNzVQ2VW6lNCeqOTvDwPz4nJUk6mLRzxW4n+pq3nOd6yfT32qVX0c9Zh4d5i6BFG 9exyQglo5k/Gd1q/+fLqhLM+4Zabu2W/PoXbiVX/dj+kM+2PtEn9562IW7jkX/C7OjhF xTFA== X-Gm-Message-State: APjAAAWVu+jhDgmLg0CgTr8UOw/0CmZ4S19fN62S4LhSMgdS9LB6eeBg VYoj73m7ld0OMsYK1M20e3U= X-Received: by 2002:a05:620a:23a:: with SMTP id u26mr66830107qkm.426.1578006843314; Thu, 02 Jan 2020 15:14:03 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id g81sm15547949qkb.70.2020.01.02.15.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2020 15:14:02 -0800 (PST) From: Arvind Sankar To: Masahiro Yamada , linux-kbuild@vger.kernel.org Cc: Al Viro , Rob Landley , Randy Dunlap , linux-kernel@vger.kernel.org Subject: [PATCH] kconfig: restore prompt dependencies in help text Date: Thu, 2 Jan 2020 18:14:02 -0500 Message-Id: <20200102231402.1052657-1-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <0ea3e528-4835-ff9c-f5a2-f711666ba75f@infradead.org> References: <0ea3e528-4835-ff9c-f5a2-f711666ba75f@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit bcdedcc1afd6 ("menuconfig: print more info for symbol without prompts") moved some code from get_prompt_str to get_symbol_str so that dependency information for symbols without prompts could be shown. This code would be better copied rather than moved, as the change had the side-effect of not showing any extra dependencies that the prompt might have over the symbol. Put back a copy of the dependency printing code in get_prompt_str. The following is an example for NAMESPACES: Before: Symbol: NAMESPACES [=y] Type : bool Prompt: Namespaces support Location: (2) -> General setup Defined at init/Kconfig:1064 Depends on: MULTIUSER [=y] After: Symbol: NAMESPACES [=y] Type : bool Prompt: Namespaces support Editable if: MULTIUSER [=y] && EXPERT [=y] Location: (2) -> General setup Defined at init/Kconfig:1064 Depends on: MULTIUSER [=y] Fixes: bcdedcc1afd6 ("menuconfig: print more info for symbol without prompts") Signed-off-by: Arvind Sankar --- scripts/kconfig/menu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index d9d16469859a..6fbbe41302dc 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -706,6 +706,12 @@ static void get_prompt_str(struct gstr *r, struct property *prop, struct jump_key *jump = NULL; str_printf(r, "Prompt: %s\n", prop->text); + if (!expr_is_yes(prop->visible.expr)) { + str_append(r, " Editable if: "); + expr_gstr_print(prop->visible.expr, r); + str_append(r, "\n"); + } + menu = prop->menu->parent; for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) { bool accessible = menu_is_visible(menu); -- 2.24.1