Linux 2.2.15pre5

Meelis Roos mroos en linux.ee
Dom Ene 30 14:45:14 CST 2000


HvB> OK, running:
HvB>     perl scripts/checkhelp.pl $(find . -name "Config*")

Speaking of this: checkconfig.pl is supposed to be called as
'make checkhelp' to include all known config scripts, not only Config*.

Also, there are some problems with current checkhelp.pl which the
following patch fixes (choice statements; dep_tristate):

--- linux/scripts/checkhelp.pl.old	Thu Dec 17 19:07:46 1998
+++ linux/scripts/checkhelp.pl	Sat Feb 27 23:17:59 1999
@@ -11,19 +11,33 @@
 #read all the files
 foreach $file (@ARGV)
 {
+	$choice='';
 	open (FILE, $file) || die "Can't open $file: $!\n";
 	while (<FILE>) {
-		# repeat until no CONFIG_* are left
-		while (/^\s*(bool|tristate|dep_tristate|string|int|hex).*' *(.*)'.*(CONFIG_\w*)/) {
-			$what=$3;
-			$name=$2;
-			s/$3//;
+		if (!$choice &&
+		    /^\s*(dep_)?(bool|tristate|string|int|hex)\s+(['"])\s*(.*)\3\s+(CONFIG_\w+)/) {
+			$what=$5;
+			$name=$4;
 			@found = grep (/$what$/, @options);
-			if ($#found == -1) {
-				next if $nohelp{$what};
+			if ($#found == -1 && !$nohelp{$what}) {
 				print "$name\n$what\n  No help for $what\n\n";
 				$nohelp{$what}=1;
 			}
+		} elsif (!$choice && /^\s*choice\s+'\s*(.*)'\s+\\/) {
+			# first line of a choice construction
+			$choice=$1;
+		} elsif ($choice) {
+		  # next line of a choice construction
+		  if (/\s*"?(\w+)\s+(CONFIG_\w+)"?\s+/) {
+			$what=$2;
+			$name=$choice;
+			@found = grep (/$what$/, @options);
+			if ($#found == -1 && !$nohelp{$what}) {
+				print "$name\n$what\n  No help for $what\n\n";
+				$nohelp{$what}=1;
+			}
+		  	$choice='';
+		  }
 		}
 	}
 	close (FILE);

-- 
Meelis Roos (mroos en tartu.cyber.ee)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



Más información sobre la lista de distribución Ayuda