lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100806140923.GA26456@merkur.ravnborg.org>
Date:	Fri, 6 Aug 2010 16:09:23 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	nir.tzachar@...il.com, mmarek@...e.cz,
	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nconfig: add search support

> 
> or I'd like to be able to find "crc" menu items in any sub-menu.
> Maybe I should just stick to config symbol searches.  I don't think it's all
> that likely that people will know how each menu line text begins.

Following patch extends symbols search to search _both_ for CONFIG_
symbols AND prompts.

I think this could be a usefull extension.
You are navigation much more around than me in the
Kconfig files / editors. What do you think?

As this is an extension in the core part it will take effect
for all the editors (which is good).
[gconf does not use sym_re_search() - I assume this feature is
missing in that editor]. 

I will cook up a proper patch only if I get positive feedback.

	Sam

diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index e95718f..8cda9c0 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -842,6 +842,7 @@ struct symbol *sym_find(const char *name)
 
 struct symbol **sym_re_search(const char *pattern)
 {
+	struct property *prop;
 	struct symbol *sym, **sym_arr = NULL;
 	int i, cnt, size;
 	regex_t re;
@@ -854,9 +855,15 @@ struct symbol **sym_re_search(const char *pattern)
 		return NULL;
 
 	for_all_symbols(i, sym) {
+		bool found = false;
 		if (sym->flags & SYMBOL_CONST || !sym->name)
 			continue;
-		if (regexec(&re, sym->name, 0, NULL, 0))
+		if (!regexec(&re, sym->name, 0, NULL, 0))
+			found = true;
+		for_all_prompts(sym, prop)
+			if (!regexec(&re, prop->text, 0, NULL, 0))
+				found = true;
+		if (!found)
 			continue;
 		if (cnt + 1 >= size) {
 			void *tmp = sym_arr;
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ