diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-11 21:28:52 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-11 21:28:52 -0400 |
| commit | 35e9a274fdc9c8feb763e4970a32d7089f51393c (patch) | |
| tree | d67ae81b870cb4531a92cbf44c07210f4ad124c7 /scripts | |
| parent | ae3e4628287de0ab90545c14076657aeee38506b (diff) | |
| parent | fb16d8912db5268f29706010ecafff74b971c58d (diff) | |
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig changes from Michal Marek:
"kconfig in v3.7 is going to
- initialize ncurses only once in menuconfig
- be able to jump to a search result in menuconfig
- change the misnomer oldnoconfig to a more meaningful name
olddefconfig, keeping the old name as alias"
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kconfig: replace 'oldnoconfig' with 'olddefconfig', and keep the old name as an alias
menuconfig: Assign jump keys per-page instead of globally
menuconfig: Do not open code textbox scroll up/down
menuconfig: Add jump keys to search results
menuconfig: Extend dialog_textbox so that it can return to a scrolled position
menuconfig: Extend dialog_textbox so that it can exit on arbitrary keypresses
menuconfig: Remove superfluous conditionnal
kconfig: document oldnoconfig to what it really does in conf.c
kconfig/mconf.c: revision of curses initialization.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/kconfig/Makefile | 12 | ||||
| -rw-r--r-- | scripts/kconfig/conf.c | 25 | ||||
| -rw-r--r-- | scripts/kconfig/expr.h | 11 | ||||
| -rw-r--r-- | scripts/kconfig/lkc_proto.h | 6 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/dialog.h | 9 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/textbox.c | 171 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/util.c | 7 | ||||
| -rw-r--r-- | scripts/kconfig/mconf.c | 123 | ||||
| -rw-r--r-- | scripts/kconfig/menu.c | 53 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.c | 2 |
10 files changed, 289 insertions, 130 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 77d53999ffb9..3091794e9354 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
| @@ -76,11 +76,17 @@ PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig | |||
| 76 | allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf | 76 | allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf |
| 77 | $< --$@ $(Kconfig) | 77 | $< --$@ $(Kconfig) |
| 78 | 78 | ||
| 79 | PHONY += listnewconfig oldnoconfig savedefconfig defconfig | 79 | PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig |
| 80 | 80 | ||
| 81 | listnewconfig oldnoconfig: $(obj)/conf | 81 | listnewconfig olddefconfig: $(obj)/conf |
| 82 | $< --$@ $(Kconfig) | 82 | $< --$@ $(Kconfig) |
| 83 | 83 | ||
| 84 | # oldnoconfig is an alias of olddefconfig, because people already are dependent | ||
| 85 | # on its behavior(sets new symbols to their default value but not 'n') with the | ||
| 86 | # counter-intuitive name. | ||
| 87 | oldnoconfig: $(obj)/conf | ||
| 88 | $< --olddefconfig $(Kconfig) | ||
| 89 | |||
| 84 | savedefconfig: $(obj)/conf | 90 | savedefconfig: $(obj)/conf |
| 85 | $< --$@=defconfig $(Kconfig) | 91 | $< --$@=defconfig $(Kconfig) |
| 86 | 92 | ||
| @@ -114,7 +120,7 @@ help: | |||
| 114 | @echo ' alldefconfig - New config with all symbols set to default' | 120 | @echo ' alldefconfig - New config with all symbols set to default' |
| 115 | @echo ' randconfig - New config with random answer to all options' | 121 | @echo ' randconfig - New config with random answer to all options' |
| 116 | @echo ' listnewconfig - List new options' | 122 | @echo ' listnewconfig - List new options' |
| 117 | @echo ' oldnoconfig - Same as silentoldconfig but sets new symbols to their default value' | 123 | @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' |
| 118 | 124 | ||
| 119 | # lxdialog stuff | 125 | # lxdialog stuff |
| 120 | check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh | 126 | check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh |
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 0dc4a2c779b1..4da3b4adfad2 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
| @@ -32,7 +32,7 @@ enum input_mode { | |||
| 32 | defconfig, | 32 | defconfig, |
| 33 | savedefconfig, | 33 | savedefconfig, |
| 34 | listnewconfig, | 34 | listnewconfig, |
| 35 | oldnoconfig, | 35 | olddefconfig, |
| 36 | } input_mode = oldaskconfig; | 36 | } input_mode = oldaskconfig; |
| 37 | 37 | ||
| 38 | static int indent = 1; | 38 | static int indent = 1; |
| @@ -365,7 +365,7 @@ static void conf(struct menu *menu) | |||
| 365 | case P_MENU: | 365 | case P_MENU: |
| 366 | if ((input_mode == silentoldconfig || | 366 | if ((input_mode == silentoldconfig || |
| 367 | input_mode == listnewconfig || | 367 | input_mode == listnewconfig || |
| 368 | input_mode == oldnoconfig) && | 368 | input_mode == olddefconfig) && |
| 369 | rootEntry != menu) { | 369 | rootEntry != menu) { |
| 370 | check_conf(menu); | 370 | check_conf(menu); |
| 371 | return; | 371 | return; |
| @@ -429,7 +429,7 @@ static void check_conf(struct menu *menu) | |||
| 429 | if (sym->name && !sym_is_choice_value(sym)) { | 429 | if (sym->name && !sym_is_choice_value(sym)) { |
| 430 | printf("%s%s\n", CONFIG_, sym->name); | 430 | printf("%s%s\n", CONFIG_, sym->name); |
| 431 | } | 431 | } |
| 432 | } else if (input_mode != oldnoconfig) { | 432 | } else if (input_mode != olddefconfig) { |
| 433 | if (!conf_cnt++) | 433 | if (!conf_cnt++) |
| 434 | printf(_("*\n* Restart config...\n*\n")); | 434 | printf(_("*\n* Restart config...\n*\n")); |
| 435 | rootEntry = menu_get_parent_menu(menu); | 435 | rootEntry = menu_get_parent_menu(menu); |
| @@ -454,7 +454,13 @@ static struct option long_opts[] = { | |||
| 454 | {"alldefconfig", no_argument, NULL, alldefconfig}, | 454 | {"alldefconfig", no_argument, NULL, alldefconfig}, |
| 455 | {"randconfig", no_argument, NULL, randconfig}, | 455 | {"randconfig", no_argument, NULL, randconfig}, |
| 456 | {"listnewconfig", no_argument, NULL, listnewconfig}, | 456 | {"listnewconfig", no_argument, NULL, listnewconfig}, |
| 457 | {"oldnoconfig", no_argument, NULL, oldnoconfig}, | 457 | {"olddefconfig", no_argument, NULL, olddefconfig}, |
| 458 | /* | ||
| 459 | * oldnoconfig is an alias of olddefconfig, because people already | ||
| 460 | * are dependent on its behavior(sets new symbols to their default | ||
| 461 | * value but not 'n') with the counter-intuitive name. | ||
| 462 | */ | ||
| 463 | {"oldnoconfig", no_argument, NULL, olddefconfig}, | ||
| 458 | {NULL, 0, NULL, 0} | 464 | {NULL, 0, NULL, 0} |
| 459 | }; | 465 | }; |
| 460 | 466 | ||
| @@ -467,7 +473,8 @@ static void conf_usage(const char *progname) | |||
| 467 | printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); | 473 | printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); |
| 468 | printf(" --oldconfig Update a configuration using a provided .config as base\n"); | 474 | printf(" --oldconfig Update a configuration using a provided .config as base\n"); |
| 469 | printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n"); | 475 | printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n"); |
| 470 | printf(" --oldnoconfig Same as silentoldconfig but set new symbols to no\n"); | 476 | printf(" --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n"); |
| 477 | printf(" --oldnoconfig An alias of olddefconfig\n"); | ||
| 471 | printf(" --defconfig <file> New config with default defined in <file>\n"); | 478 | printf(" --defconfig <file> New config with default defined in <file>\n"); |
| 472 | printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); | 479 | printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); |
| 473 | printf(" --allnoconfig New config where all options are answered with no\n"); | 480 | printf(" --allnoconfig New config where all options are answered with no\n"); |
| @@ -520,7 +527,7 @@ int main(int ac, char **av) | |||
| 520 | case allmodconfig: | 527 | case allmodconfig: |
| 521 | case alldefconfig: | 528 | case alldefconfig: |
| 522 | case listnewconfig: | 529 | case listnewconfig: |
| 523 | case oldnoconfig: | 530 | case olddefconfig: |
| 524 | break; | 531 | break; |
| 525 | case '?': | 532 | case '?': |
| 526 | conf_usage(progname); | 533 | conf_usage(progname); |
| @@ -565,7 +572,7 @@ int main(int ac, char **av) | |||
| 565 | case oldaskconfig: | 572 | case oldaskconfig: |
| 566 | case oldconfig: | 573 | case oldconfig: |
| 567 | case listnewconfig: | 574 | case listnewconfig: |
| 568 | case oldnoconfig: | 575 | case olddefconfig: |
| 569 | conf_read(NULL); | 576 | conf_read(NULL); |
| 570 | break; | 577 | break; |
| 571 | case allnoconfig: | 578 | case allnoconfig: |
| @@ -645,7 +652,7 @@ int main(int ac, char **av) | |||
| 645 | /* fall through */ | 652 | /* fall through */ |
| 646 | case oldconfig: | 653 | case oldconfig: |
| 647 | case listnewconfig: | 654 | case listnewconfig: |
| 648 | case oldnoconfig: | 655 | case olddefconfig: |
| 649 | case silentoldconfig: | 656 | case silentoldconfig: |
| 650 | /* Update until a loop caused no more changes */ | 657 | /* Update until a loop caused no more changes */ |
| 651 | do { | 658 | do { |
| @@ -653,7 +660,7 @@ int main(int ac, char **av) | |||
| 653 | check_conf(&rootmenu); | 660 | check_conf(&rootmenu); |
| 654 | } while (conf_cnt && | 661 | } while (conf_cnt && |
| 655 | (input_mode != listnewconfig && | 662 | (input_mode != listnewconfig && |
| 656 | input_mode != oldnoconfig)); | 663 | input_mode != olddefconfig)); |
| 657 | break; | 664 | break; |
| 658 | } | 665 | } |
| 659 | 666 | ||
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index d4ecce8bc3a6..bd2e09895553 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h | |||
| @@ -12,6 +12,7 @@ extern "C" { | |||
| 12 | 12 | ||
| 13 | #include <assert.h> | 13 | #include <assert.h> |
| 14 | #include <stdio.h> | 14 | #include <stdio.h> |
| 15 | #include <sys/queue.h> | ||
| 15 | #ifndef __cplusplus | 16 | #ifndef __cplusplus |
| 16 | #include <stdbool.h> | 17 | #include <stdbool.h> |
| 17 | #endif | 18 | #endif |
| @@ -173,6 +174,16 @@ struct menu { | |||
| 173 | #define MENU_CHANGED 0x0001 | 174 | #define MENU_CHANGED 0x0001 |
| 174 | #define MENU_ROOT 0x0002 | 175 | #define MENU_ROOT 0x0002 |
| 175 | 176 | ||
| 177 | struct jump_key { | ||
| 178 | CIRCLEQ_ENTRY(jump_key) entries; | ||
| 179 | size_t offset; | ||
| 180 | struct menu *target; | ||
| 181 | int index; | ||
| 182 | }; | ||
