diff options
author | Sage Weil <sage@newdream.net> | 2008-08-02 21:20:11 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2008-08-02 21:20:11 -0700 |
commit | 4f1c228e643288c41d7d18c1bbe85f21f67f95e7 (patch) | |
tree | 8da4fe8f1d7b8669393cd242ddedc0d2c9637918 /src/script | |
parent | 11c1de5c07c3bfb7ba70e658465e64a8e6d565ea (diff) | |
download | ceph-4f1c228e643288c41d7d18c1bbe85f21f67f95e7.tar.gz |
check_dendl.pl script
Diffstat (limited to 'src/script')
-rwxr-xr-x | src/script/check_dendl.pl | 24 |
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++; +} |