Commit a538d405 authored by Peter Korsgaard's avatar Peter Korsgaard
Browse files

package/config: rebase against 2.6.37

parent 72daa122
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ struct menu {
	struct menu *list;
	struct symbol *sym;
	struct property *prompt;
	struct expr *visibility;
	struct expr *dep;
	unsigned int flags;
	char *help;
+1 −0
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@ void menu_end_menu(void);
void menu_add_entry(struct symbol *sym);
void menu_end_entry(void);
void menu_add_dep(struct expr *dep);
void menu_add_visibility(struct expr *dep);
struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
+25 −0
Original line number Diff line number Diff line
@@ -140,6 +140,20 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
		}
		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;
@@ -152,6 +166,12 @@ struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr
	return menu_add_prop(type, prompt, NULL, dep);
}

void menu_add_visibility(struct expr *expr)
{
	current_entry->visibility = expr_alloc_and(current_entry->visibility,
	    expr);
}

void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep)
{
	menu_add_prop(type, NULL, expr, dep);
@@ -410,6 +430,11 @@ bool menu_is_visible(struct menu *menu)
	if (!menu->prompt)
		return false;

	if (menu->visibility) {
		if (expr_calc_value(menu->visibility) == no)
			return no;
	}

	sym = menu->sym;
	if (sym) {
		sym_calc_value(sym);
+2 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ Index: config/zconf.tab.c_shipped
===================================================================
--- config.orig/zconf.tab.c_shipped
+++ config/zconf.tab.c_shipped
@@ -2239,7 +2239,7 @@
@@ -2256,7 +2256,7 @@
 	modules_sym = sym_lookup(NULL, 0);
 	modules_sym->type = S_BOOLEAN;
 	modules_sym->flags |= SYMBOL_AUTO;
@@ -51,7 +51,7 @@ Index: config/zconf.y
===================================================================
--- config.orig/zconf.y
+++ config/zconf.y
@@ -487,7 +487,7 @@
@@ -501,7 +501,7 @@
 	modules_sym = sym_lookup(NULL, 0);
 	modules_sym->type = S_BOOLEAN;
 	modules_sym->flags |= SYMBOL_AUTO;
+1 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ Index: config/menu.c
===================================================================
--- config.orig/menu.c
+++ config/menu.c
@@ -563,7 +563,7 @@
@@ -588,7 +588,7 @@
 
 	if (menu_has_help(menu)) {
 		if (sym->name) {
Loading