From: Jens Axboe Date: Tue, 14 Feb 2006 09:22:42 +0000 (+0100) Subject: [PATCH] blkrawverify: check and convert data appropriately X-Git-Tag: blktrace-0.99.1~51 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=4ff24a34c39259181e52edee36106b81759d647d;p=blktrace.git [PATCH] blkrawverify: check and convert data appropriately --- diff --git a/blkrawverify.c b/blkrawverify.c index dbcdecf..238c3ab 100644 --- a/blkrawverify.c +++ b/blkrawverify.c @@ -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) { + if (data_is_native == -1) + check_data_endianness(bit->magic); + trace_to_cpu(bit); if (!CHECK_MAGIC(bit)) {