summaryrefslogtreecommitdiff
path: root/btrace
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-09-14 19:30:49 +0200
committerJens Axboe <axboe@suse.de>2005-09-14 19:30:49 +0200
commit1e1c60f1486f9301d8065a21d1828a677143d2be (patch)
tree12c3a5e61c8b474b311caa57bbb48ae41c8a3982 /btrace
parent1be606ce18a982e227148023f0b84c5c1806df3b (diff)
downloadblktrace-1e1c60f1486f9301d8065a21d1828a677143d2be.tar.gz
blktrace-1e1c60f1486f9301d8065a21d1828a677143d2be.tar.bz2
[PATCH] btrace: make the output easily parsably by default
Drop CPU/device summary unless specifically requested.
Diffstat (limited to 'btrace')
-rw-r--r--btrace7
1 files changed, 5 insertions, 2 deletions
diff --git a/btrace b/btrace
index d74d9c2..f698f9c 100644
--- a/btrace
+++ b/btrace
@@ -8,20 +8,23 @@
TRACEOPTS=""
PARSEOPTS=""
-USAGE="Usage: btrace [-s] [-t] [-a <trace>...] <dev>..."
+SUMMARIZE="-q" # quiet (no dev/cpu summary by default)
+USAGE="Usage: btrace [-s] [-t] [-S] [-a <trace>...] <dev>..."
DIRNAME=`dirname $0`
-while getopts "a:st" c
+while getopts "a:stS" c
do
case $c in
a) TRACEOPTS=$TRACEOPTS" -a "$OPTARG" ";;
s) PARSEOPTS=$PARSEOPTS" -s";;
t) PARSEOPTS=$PARSEOPTS" -t";;
+ S) SUMMARIZE="";;
\?) echo $USAGE 1>&2
exit 2
;;
esac
done
+PARSEOPTS=${PARSEOPTS}${SUMMARIZE}
shift `expr $OPTIND - 1`
if [ $# -eq 0 ]; then