projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86368eb
)
[PATCH] blkrawverify: account bad traces, don't dump a warning for each of them
author
Jens Axboe
<axboe@suse.de>
Tue, 7 Feb 2006 13:23:54 +0000
(14:23 +0100)
committer
Jens Axboe
<axboe@suse.de>
Tue, 7 Feb 2006 13:23:54 +0000
(14:23 +0100)
blkrawverify.c
patch
|
blob
|
blame
|
history
diff --git
a/blkrawverify.c
b/blkrawverify.c
index 51e7963b67ed2ab51eb2ca008c39c12a9dd5dae3..7c64aa85e04c23dbe93ffd4bf960748663803f17 100644
(file)
--- a/
blkrawverify.c
+++ b/
blkrawverify.c
@@
-151,11
+151,17
@@
static int process(FILE *ofp, char *file, unsigned int cpu)
ifp = fopen(file, "r");
while ((n = fread(bit, sizeof(struct blk_io_trace), 1, ifp)) == 1) {
trace_to_cpu(bit);
- if (verify_trace(bit)) {
+
+ if (!CHECK_MAGIC(bit)) {
INC_BAD("bad trace");
continue;
}
+ if ((bit->magic & 0xff) != SUPPORTED_VERSION) {
+ fprintf(stderr, "unsupported trace version\n");
+ break;
+ }
+
if (bit->pdu_len) {
char *pdu_buf;