[PATCH 22/31] blkrawverify: fix dumping of erroneous trace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bytes field was output twice.
PID field was missing.

Sort device field among other fields as in struct blk_io_trace.

Signed-off-by: Steffen Maier <maier@xxxxxxxxxxxxx>
---
 blkrawverify.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/blkrawverify.c b/blkrawverify.c
index ed5d258da438..17e36bcf05bb 100644
--- a/blkrawverify.c
+++ b/blkrawverify.c
@@ -111,12 +111,12 @@ static void dump_trace(FILE *ofp, char *prefix, struct blk_io_trace *bit)
 	fprintf(ofp, "        %8s: %llu\n", "sector", (unsigned long long) bit->sector);
 	fprintf(ofp, "        %8s: %u\n", "bytes", bit->bytes);
 	fprintf(ofp, "        %8s: %s\n", "action", act_to_str(bit->action));
-	fprintf(ofp, "        %8s: %u\n", "bytes", bit->bytes);
+	fprintf(ofp, "        %8s: %u\n", "pid", bit->pid);
+	fprintf(ofp, "        %8s: (%u,%u)\n\n", "device", MAJOR(bit->device),
+							   MINOR(bit->device));
 	fprintf(ofp, "        %8s: %u\n", "cpu", bit->cpu);
 	fprintf(ofp, "        %8s: %u\n", "error", bit->error);
 	fprintf(ofp, "        %8s: %u\n", "pdu_len", bit->pdu_len);
-	fprintf(ofp, "        %8s: (%u,%u)\n\n", "device", MAJOR(bit->device),
-						           MINOR(bit->device));
 }
 
 static int process(FILE **fp, char *devname, char *file, unsigned int cpu)
-- 
2.14.2

--
To unsubscribe from this list: send the line "unsubscribe linux-btrace" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux