aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2013-05-30 09:21:48 -0400
committerMichal Marek <mmarek@suse.cz>2013-05-30 09:21:48 -0400
commit42a0940d9d582214a8d0f8ba41f2b4fe987e21b0 (patch)
tree4306b63c01c75d1b6bb8a8a3d1c28494a4495325 /scripts
parentad06156876c0e55a01e13e1f2dd5c7f9262b1dfa (diff)
parente983b7b17ad1a978e954e6aaa62cf12bfc747883 (diff)
Merge branch 'yem-kconfig-rc-fixes' of git://gitorious.org/linux-kconfig/linux-kconfig into kbuild/rc-fixes
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/config2
-rw-r--r--scripts/kconfig/lxdialog/menubox.c9
-rw-r--r--scripts/kconfig/mconf.c11
-rw-r--r--scripts/kconfig/menu.c15
4 files changed, 26 insertions, 11 deletions
diff --git a/scripts/config b/scripts/config
index bb4d3deb6d1c..a65ecbbdd32a 100755
--- a/scripts/config
+++ b/scripts/config
@@ -105,7 +105,7 @@ while [ "$1" != "" ] ; do
105 ;; 105 ;;
106 --refresh) 106 --refresh)
107 ;; 107 ;;
108 --*-after) 108 --*-after|-E|-D|-M)
109 checkarg "$1" 109 checkarg "$1"
110 A=$ARG 110 A=$ARG
111 checkarg "$2" 111 checkarg "$2"
diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
index 48d382e7e374..38cd69c5660e 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -303,10 +303,11 @@ do_resize:
303 } 303 }
304 } 304 }
305 305
306 if (i < max_choice || 306 if (item_count() != 0 &&
307 key == KEY_UP || key == KEY_DOWN || 307 (i < max_choice ||
308 key == '-' || key == '+' || 308 key == KEY_UP || key == KEY_DOWN ||
309 key == KEY_PPAGE || key == KEY_NPAGE) { 309 key == '-' || key == '+' ||
310 key == KEY_PPAGE || key == KEY_NPAGE)) {
310 /* Remove highligt of current item */ 311 /* Remove highligt of current item */
311 print_item(scroll + choice, choice, FALSE); 312 print_item(scroll + choice, choice, FALSE);
312 313
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 387dc8daf7b2..a69cbd78fb38 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -670,11 +670,12 @@ static void conf(struct menu *menu, struct menu *active_menu)
670 active_menu, &s_scroll); 670 active_menu, &s_scroll);
671 if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL) 671 if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
672 break; 672 break;
673 if (!item_activate_selected()) 673 if (item_count() != 0) {
674 continue; 674 if (!item_activate_selected())
675 if (!item_tag()) 675 continue;
676 continue; 676 if (!item_tag())
677 677 continue;
678 }
678 submenu = item_data(); 679 submenu = item_data();
679 active_menu = item_data(); 680 active_menu = item_data();
680 if (submenu) 681 if (submenu)
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index b5c7d90df9df..fd3f0180e08f 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -146,11 +146,24 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
146 struct menu *menu = current_entry; 146 struct menu *menu = current_entry;
147 147
148 while ((menu = menu->parent) != NULL) { 148 while ((menu = menu->parent) != NULL) {
149 struct expr *dup_expr;
150
149 if (!menu->visibility) 151 if (!menu->visibility)
150 continue; 152 continue;
153 /*
154 * Do not add a reference to the
155 * menu's visibility expression but
156 * use a copy of it. Otherwise the
157 * expression reduction functions
158 * will modify expressions that have
159 * multiple references which can
160 * cause unwanted side effects.
161 */
162 dup_expr = expr_copy(menu->visibility);
163
151 prop->visible.expr 164 prop->visible.expr
152 = expr_alloc_and(prop->visible.expr, 165 = expr_alloc_and(prop->visible.expr,
153 menu->visibility); 166 dup_expr);
154 } 167 }
155 } 168 }
156 169