Skip to contentSkip to conversation

SCRIPTS: Correct RE in header CONFIG leak check.

PATCH New Robert P. J. Day 1 participant 1 message May 10, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SCRIPTS: Correct RE in header CONFIG leak check.

Correct the regular expression in scripts/headers_check.pl to include '_' as a valid character in the class; otherwise, the check will report a "leaked" symbol of CONFIG_A_B_C as merely CONFIG_A.

---

scripts/headers_check.pl +1 -1
index 56f90a4..4414c43 100644
@@ -70,7 +70,7 @@ sub check_prototypes
 
 sub check_config
 {
-	if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9]+)[^a-zA-Z0-9]/) {
+	if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9_]+)[^a-zA-Z0-9_]/) {
 		printf STDERR "$filename:$lineno: leaks CONFIG_$1 to userspace where it is not valid\n";
 	}
 }

========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Linked In:                             http://www.linkedin.com/in/rpjday
Twitter:                                       http://twitter.com/rpjday

========================================================================