[PATCH v5 6/6] cmd-list.perl: ignore all lines until [commands]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



command-list.txt contains a [common] block that should be ignored
by the Documentation checker cmd-list.perl.

Filter out this block before the actual processing of the command list.

Signed-off-by: Sébastien Guimmara <sebastien.guimmara@xxxxxxxxx>
---
 Documentation/cmd-list.perl | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl
index 04f9977..d581378 100755
--- a/Documentation/cmd-list.perl
+++ b/Documentation/cmd-list.perl
@@ -38,8 +38,14 @@ sub format_one {
 	}
 }
 
+my @filtered = ();
+while (<>)
+{
+	push (@filtered, $_) unless 1../^\[commands\]/;
+}
+
 my %cmds = ();
-for (sort <>) {
+for (sort @filtered) {
 	next if /^#/;
 
 	chomp;
-- 
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]