summaryrefslogtreecommitdiff
path: root/blkrawverify.c
diff options
context:
space:
mode:
authorAlan D. Brunelle <Alan.Brunelle@hp.com>2007-02-12 17:24:28 +0100
committerJens Axboe <axboe@carl.home.kernel.dk>2007-02-12 17:24:28 +0100
commit2b9df5a16d88c33139e5f85f40ca7fd55e43b35c (patch)
tree1949c690f0626ef656c259dd2a8d4716c514ceb0 /blkrawverify.c
parent33f35150fdb42f350c13c6dd2bb5a3a2d17c23b0 (diff)
downloadblktrace-2b9df5a16d88c33139e5f85f40ca7fd55e43b35c.tar.gz
blktrace-2b9df5a16d88c33139e5f85f40ca7fd55e43b35c.tar.bz2
Added return from blkrawverify to signal success or failure.
Diffstat (limited to 'blkrawverify.c')
-rw-r--r--blkrawverify.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/blkrawverify.c b/blkrawverify.c
index d131747..82a435e 100644
--- a/blkrawverify.c
+++ b/blkrawverify.c
@@ -276,7 +276,7 @@ int main(int argc, char *argv[])
{
char *devname;
struct stat st;
- int i, cpu, nbad;
+ int i, cpu, nbad, rval = 0;
FILE *ofp;
char *ofname = malloc(1024);
char *fname = malloc(1024);
@@ -299,8 +299,10 @@ int main(int argc, char *argv[])
break;
printf(" CPU %d ", cpu); fflush(stdout);
nbad = process(&ofp, devname, fname, cpu);
- if (nbad)
+ if (nbad) {
printf("-- %d bad", nbad);
+ rval = 1;
+ }
printf("\n");
}
if (ofp) {
@@ -309,5 +311,5 @@ int main(int argc, char *argv[])
}
}
- return 0;
+ return rval;
}