blkparse: exit with error if no tracefiles found
authorEric Sandeen <sandeen@redhat.com>
Mon, 19 Apr 2010 17:15:23 +0000 (19:15 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 19 Apr 2010 17:15:23 +0000 (19:15 +0200)
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>
blkparse.c

index 5a49d6b88fbfe90be08fc138575647d511f89e77..9bd8023ecdc39da38c3bf18e406b11ac3e8c1150 100644 (file)
@@ -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;
+               }
        }
 
        /*