blkrawverify: fix dumping of erroneous trace
PATCH 22/31 blkrawverify: fix dumping of erroneous trace
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 <[email protected]>
--- blkrawverify.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
blkrawverify.c +3 -3
@@ -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)
Signature · 1 line
2.14.2