[PATCH] blkrawverify: check and convert data appropriately
authorJens Axboe <axboe@suse.de>
Tue, 14 Feb 2006 09:22:42 +0000 (10:22 +0100)
committerJens Axboe <axboe@suse.de>
Tue, 14 Feb 2006 09:22:42 +0000 (10:22 +0100)
blkrawverify.c

index dbcdecfaf05b438134fddd0431f4412bc857646e..238c3ab7c7c71de0da739a827bc7e801b1e9a8ef 100644 (file)
@@ -150,6 +150,9 @@ 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) {
 
        ifp = fopen(file, "r");
        while ((n = fread(bit, sizeof(struct blk_io_trace), 1, ifp)) == 1) {
+               if (data_is_native == -1)
+                       check_data_endianness(bit->magic);
+
                trace_to_cpu(bit);
 
                if (!CHECK_MAGIC(bit)) {
                trace_to_cpu(bit);
 
                if (!CHECK_MAGIC(bit)) {