aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2007-07-09 14:43:56 -0400
committerSam Ravnborg <sam@ravnborg.org>2007-07-17 08:24:55 -0400
commit0584f9f9cb3642274cc0f289f36524827868fe68 (patch)
tree4536fc0fbe5590ca1d6f62298217510715129716 /scripts/kconfig
parentc05190371d5ca360b75864cfcf930e8bf3addeb1 (diff)
kconfig: strip 'CONFIG_' automatically in kernel configuration search
Modify the ncurses configuration tool ('make menuconfig') in a way that the user can enter the search string (/) both with or without the leading 'CONFIG_'. This simplifies using copy & paste from .config files because you can select the whole word. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/mconf.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index d0e4fa594fc..d2c2a429887 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -419,11 +419,13 @@ static void search_conf(void)
419{ 419{
420 struct symbol **sym_arr; 420 struct symbol **sym_arr;
421 struct gstr res; 421 struct gstr res;
422 char *dialog_input;
422 int dres; 423 int dres;
423again: 424again:
424 dialog_clear(); 425 dialog_clear();
425 dres = dialog_inputbox(_("Search Configuration Parameter"), 426 dres = dialog_inputbox(_("Search Configuration Parameter"),
426 _("Enter CONFIG_ (sub)string to search for (omit CONFIG_)"), 427 _("Enter CONFIG_ (sub)string to search for "
428 "(with or without \"CONFIG\")"),
427 10, 75, ""); 429 10, 75, "");
428 switch (dres) { 430 switch (dres) {
429 case 0: 431 case 0:
@@ -435,7 +437,12 @@ again:
435 return; 437 return;
436 } 438 }
437 439
438 sym_arr = sym_re_search(dialog_input_result); 440 /* strip CONFIG_ if necessary */
441 dialog_input = dialog_input_result;
442 if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0)
443 dialog_input += 7;
444
445 sym_arr = sym_re_search(dialog_input);
439 res = get_relations_str(sym_arr); 446 res = get_relations_str(sym_arr);
440 free(sym_arr); 447 free(sym_arr);
441 show_textbox(_("Search Results"), str_get(&res), 0, 0); 448 show_textbox(_("Search Results"), str_get(&res), 0, 0);