summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2010-04-19 19:15:23 +0200
committerJens Axboe <jens.axboe@oracle.com>2010-04-19 19:15:23 +0200
commita2b1f3550a0bd4ab9e351bd2881fab1f1340bf1e (patch)
tree53d6f02619b28ec28763eec2cee9bac7cd32fa7c
parent677ef89ccb24fb3e38b13b02b9394318afb78f30 (diff)
downloadblktrace-a2b1f3550a0bd4ab9e351bd2881fab1f1340bf1e.tar.gz
blktrace-a2b1f3550a0bd4ab9e351bd2881fab1f1340bf1e.tar.bz2
blkparse: exit with error if no tracefiles found
If no tracefiles are found, exit with non-0 status Resolves Red Hat Bugzilla #500118 Reported-by: Milos Malik <mmalik@redhat.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--blkparse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/blkparse.c b/blkparse.c
index 5a49d6b..9bd8023 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -2518,6 +2518,12 @@ static int do_file(void)
for (cpu = 0; setup_file(pdi, cpu); cpu++)
;
+
+ if (!cpu) {
+ fprintf(stderr,"No input files found for %s\n",
+ pdi->name);
+ return 1;
+ }
}
/*