aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.lib2
-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
5 files changed, 27 insertions, 12 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 51bb3de680b6..8337663aa298 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -264,7 +264,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
264quiet_cmd_dtc = DTC $@ 264quiet_cmd_dtc = DTC $@
265cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ 265cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
266 $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ 266 $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
267 -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \ 267 -i $(dir $<) $(DTC_FLAGS) \
268 -d $(depfile).dtc $(dtc-tmp) ; \ 268 -d $(depfile).dtc $(dtc-tmp) ; \
269 cat $(depfile).pre $(depfile).dtc > $(depfile) 269 cat $(depfile).pre $(depfile).dtc > $(depfile)
270 270
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