From patchwork Thu Dec 9 08:11:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 393302 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB98AmBD024547 for ; Thu, 9 Dec 2010 08:10:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753448Ab0LIIKr (ORCPT ); Thu, 9 Dec 2010 03:10:47 -0500 Received: from vpn.id2.novell.com ([195.33.99.129]:44981 "EHLO vpn.id2.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752403Ab0LIIKr convert rfc822-to-8bit (ORCPT ); Thu, 9 Dec 2010 03:10:47 -0500 Received: from EMEA1-MTA by vpn.id2.novell.com with Novell_GroupWise; Thu, 09 Dec 2010 08:48:51 +0000 Message-Id: <4D009D4A0200007800026DDB@vpn.id2.novell.com> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 09 Dec 2010 08:11:38 +0000 From: "Jan Beulich" To: Cc: "Arnaud Lacombe" , , "Michal Marek" Subject: [PATCH] fix undesirable side effect of adding "visible" menu attribute Mime-Version: 1.0 Content-Disposition: inline Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 09 Dec 2010 08:10:48 +0000 (UTC) --- 2.6.37-rc5/scripts/kconfig/menu.c +++ 2.6.37-rc5-kconfig-propagate-visibility/scripts/kconfig/menu.c @@ -140,6 +140,20 @@ struct property *menu_add_prop(enum prop } if (current_entry->prompt && current_entry != &rootmenu) prop_warn(prop, "prompt redefined"); + + /* Apply all upper menus' visibilities to actual prompts. */ + if(type == P_PROMPT) { + struct menu *menu = current_entry; + + while ((menu = menu->parent) != NULL) { + if (!menu->visibility) + continue; + prop->visible.expr + = expr_alloc_and(prop->visible.expr, + menu->visibility); + } + } + current_entry->prompt = prop; } prop->text = prompt;