diff options
| author | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 10:37:02 -0400 |
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 10:37:02 -0400 |
| commit | ab11b487402f97975f3ac1eeea09c82f4431481e (patch) | |
| tree | 86337c5cbbd2b0c4bd07c0847a1dc7de3d898147 /scripts/kconfig/menu.c | |
| parent | 1c689cbcf2c2b7a35cd237abddd9206bb1b6fee1 (diff) | |
| parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff) | |
Merge branch 'master' into for-linus
Diffstat (limited to 'scripts/kconfig/menu.c')
| -rw-r--r-- | scripts/kconfig/menu.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 203632cc30bd..4fb590247f33 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c | |||
| @@ -58,6 +58,8 @@ void menu_add_entry(struct symbol *sym) | |||
| 58 | *last_entry_ptr = menu; | 58 | *last_entry_ptr = menu; |
| 59 | last_entry_ptr = &menu->next; | 59 | last_entry_ptr = &menu->next; |
| 60 | current_entry = menu; | 60 | current_entry = menu; |
| 61 | if (sym) | ||
| 62 | menu_add_symbol(P_SYMBOL, sym, NULL); | ||
| 61 | } | 63 | } |
| 62 | 64 | ||
| 63 | void menu_end_entry(void) | 65 | void menu_end_entry(void) |
| @@ -105,6 +107,7 @@ static struct expr *menu_check_dep(struct expr *e) | |||
| 105 | void menu_add_dep(struct expr *dep) | 107 | void menu_add_dep(struct expr *dep) |
| 106 | { | 108 | { |
| 107 | current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep)); | 109 | current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep)); |
| 110 | current_entry->dir_dep = current_entry->dep; | ||
| 108 | } | 111 | } |
| 109 | 112 | ||
| 110 | void menu_set_type(int type) | 113 | void menu_set_type(int type) |
| @@ -288,6 +291,10 @@ void menu_finalize(struct menu *parent) | |||
| 288 | for (menu = parent->list; menu; menu = menu->next) | 291 | for (menu = parent->list; menu; menu = menu->next) |
| 289 | menu_finalize(menu); | 292 | menu_finalize(menu); |
| 290 | } else if (sym) { | 293 | } else if (sym) { |
| 294 | /* ignore inherited dependencies for dir_dep */ | ||
| 295 | sym->dir_dep.expr = expr_transform(expr_copy(parent->dir_dep)); | ||
| 296 | sym->dir_dep.expr = expr_eliminate_dups(sym->dir_dep.expr); | ||
| 297 | |||
| 291 | basedep = parent->prompt ? parent->prompt->visible.expr : NULL; | 298 | basedep = parent->prompt ? parent->prompt->visible.expr : NULL; |
| 292 | basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); | 299 | basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); |
| 293 | basedep = expr_eliminate_dups(expr_transform(basedep)); | 300 | basedep = expr_eliminate_dups(expr_transform(basedep)); |
| @@ -419,9 +426,13 @@ bool menu_is_visible(struct menu *menu) | |||
| 419 | if (!sym || sym_get_tristate_value(menu->sym) == no) | 426 | if (!sym || sym_get_tristate_value(menu->sym) == no) |
| 420 | return false; | 427 | return false; |
| 421 | 428 | ||
| 422 | for (child = menu->list; child; child = child->next) | 429 | for (child = menu->list; child; child = child->next) { |
| 423 | if (menu_is_visible(child)) | 430 | if (menu_is_visible(child)) { |
| 431 | if (sym) | ||
| 432 | sym->flags |= SYMBOL_DEF_USER; | ||
| 424 | return true; | 433 | return true; |
| 434 | } | ||
| 435 | } | ||
| 425 | 436 | ||
| 426 | return false; | 437 | return false; |
| 427 | } | 438 | } |
| @@ -501,9 +512,19 @@ void get_symbol_str(struct gstr *r, struct symbol *sym) | |||
| 501 | bool hit; | 512 | bool hit; |
| 502 | struct property *prop; | 513 | struct property *prop; |
| 503 | 514 | ||
| 504 | if (sym && sym->name) | 515 | if (sym && sym->name) { |
| 505 | str_printf(r, "Symbol: %s [=%s]\n", sym->name, | 516 | str_printf(r, "Symbol: %s [=%s]\n", sym->name, |
| 506 | sym_get_string_value(sym)); | 517 | sym_get_string_value(sym)); |
| 518 | str_printf(r, "Type : %s\n", sym_type_name(sym->type)); | ||
| 519 | if (sym->type == S_INT || sym->type == S_HEX) { | ||
| 520 | prop = sym_get_range_prop(sym); | ||
| 521 | if (prop) { | ||
| 522 | str_printf(r, "Range : "); | ||
| 523 | expr_gstr_print(prop->expr, r); | ||
| 524 | str_append(r, "\n"); | ||
| 525 | } | ||
| 526 | } | ||
| 527 | } | ||
| 507 | for_all_prompts(sym, prop) | 528 | for_all_prompts(sym, prop) |
| 508 | get_prompt_str(r, prop); | 529 | get_prompt_str(r, prop); |
| 509 | hit = false; | 530 | hit = false; |
