summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2008-08-02 21:20:11 -0700
committerSage Weil <sage@newdream.net>2008-08-02 21:20:11 -0700
commit4f1c228e643288c41d7d18c1bbe85f21f67f95e7 (patch)
tree8da4fe8f1d7b8669393cd242ddedc0d2c9637918 /src/script
parent11c1de5c07c3bfb7ba70e658465e64a8e6d565ea (diff)
downloadceph-4f1c228e643288c41d7d18c1bbe85f21f67f95e7.tar.gz
check_dendl.pl script
Diffstat (limited to 'src/script')
-rwxr-xr-xsrc/script/check_dendl.pl24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/script/check_dendl.pl b/src/script/check_dendl.pl
new file mode 100755
index 00000000000..b57bc0c061a
--- /dev/null
+++ b/src/script/check_dendl.pl
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+
+my $in = 0;
+my $line = 1;
+while (<>) {
+ chomp;
+ my $l = $_;
+ my @w = split(/\s+/, $_);
+ for (@w) {
+ if (/^(\/\/)?dout\(\s*\-?\s*\d+\s*\)$/) {
+ warn "$line: dout without dendl: $l\n" if $in;
+ $in = 1;
+ }
+ elsif (/^derr\(\s*\-?\s*\d+\s*\)$/) {
+ warn "$line: dout without dendl: $l\n" if $in;
+ $in = 1;
+ }
+ elsif (/^dendl/) {
+ warn "$line: dendl without dout: $l\n" unless $in;
+ $in = 0;
+ }
+ }
+ $line++;
+}