fsx: Fix hex numbers in operation dump
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 11 Jan 2016 03:44:05 +0000 (14:44 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 11 Jan 2016 03:44:05 +0000 (14:44 +1100)
Some hex numbers are prefixed with "0x" and right-aligned with spaces,
leading to output like "0x beef".  Make that "0x0beef" instead.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
ltp/fsx.c

index 805fdfb0391286420b0ad2108642d32e57efab94..16d74c0c0e41e6c88927dc34b7ed0ffd653b1efd 100644 (file)
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -447,10 +447,10 @@ check_buffers(unsigned offset, unsigned size)
                        if (c != t) {
                                if (n < 16) {
                                        bad = short_at(&temp_buf[i]);
-                                       prt("0x%5x\t0x%04x\t0x%04x", offset,
+                                       prt("0x%05x\t0x%04x\t0x%04x", offset,
                                            short_at(&good_buf[offset]), bad);
                                        op = temp_buf[offset & 1 ? i+1 : i];
-                                       prt("\t0x%5x\n", n);
+                                       prt("\t0x%05x\n", n);
                                        if (op)
                                                prt("operation# (mod 256) for "
                                                  "the bad data may be %u\n",