[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11846813442541-git-send-email-sam@ravnborg.org>
Date: Tue, 17 Jul 2007 16:08:55 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: linux-kernel@...r.kernel.org
Cc: Bernhard Walle <bwalle@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Sam Ravnborg <sam@...nborg.org>
Subject: [PATCH 26/33] kconfig: strip 'CONFIG_' automatically in kernel configuration search
From: Bernhard Walle <bwalle@...e.de>
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@...e.de>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@...nborg.org>
---
scripts/kconfig/mconf.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index d0e4fa5..d2c2a42 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -419,11 +419,13 @@ static void search_conf(void)
{
struct symbol **sym_arr;
struct gstr res;
+ char *dialog_input;
int dres;
again:
dialog_clear();
dres = dialog_inputbox(_("Search Configuration Parameter"),
- _("Enter CONFIG_ (sub)string to search for (omit CONFIG_)"),
+ _("Enter CONFIG_ (sub)string to search for "
+ "(with or without \"CONFIG\")"),
10, 75, "");
switch (dres) {
case 0:
@@ -435,7 +437,12 @@ again:
return;
}
- sym_arr = sym_re_search(dialog_input_result);
+ /* strip CONFIG_ if necessary */
+ dialog_input = dialog_input_result;
+ if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0)
+ dialog_input += 7;
+
+ sym_arr = sym_re_search(dialog_input);
res = get_relations_str(sym_arr);
free(sym_arr);
show_textbox(_("Search Results"), str_get(&res), 0, 0);
--
1.5.0.6
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists