summaryrefslogtreecommitdiff
path: root/blkparse.c
diff options
context:
space:
mode:
authorMing Zhang <blackmagic02881@gmail.com>2006-12-21 15:56:19 +0100
committerJens Axboe <jens.axboe@oracle.com>2006-12-21 15:56:19 +0100
commitfb863d7ccfc7105bd71c89129e472f5eae14be9c (patch)
tree11b50927fbaff317a07781e1f3d87eb605a11848 /blkparse.c
parent8a82e321006f3a44d766a53d34f60a472375b8fc (diff)
downloadblktrace-fb863d7ccfc7105bd71c89129e472f5eae14be9c.tar.gz
blktrace-fb863d7ccfc7105bd71c89129e472f5eae14be9c.tar.bz2
[PATCH] check do_foo return value before show_stat()
current code will show_stats() even when do_foo() return non zero. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'blkparse.c')
-rw-r--r--blkparse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/blkparse.c b/blkparse.c
index b4c371a..6bb5308 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -2654,7 +2654,9 @@ int main(int argc, char *argv[])
else
ret = do_file();
- show_stats();
+ if (!ret)
+ show_stats();
+
if (ofp_buffer) {
fflush(ofp);
free(ofp_buffer);