From 104bdd2809b81013b559db94e3a5de695d7ce698 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 12 Apr 2005 09:31:49 +0000 Subject: [PATCH] Branch: b1_4 Fix up offset printing for fsx. --- lustre/tests/directio.c | 6 +++--- lustre/tests/fsx.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lustre/tests/directio.c b/lustre/tests/directio.c index 8896f15..933c988 100644 --- a/lustre/tests/directio.c +++ b/lustre/tests/directio.c @@ -81,7 +81,7 @@ int main(int argc, char **argv) rc = write(fd, wbuf, len); if (rc != len) { - printf("Write error %s (rc = %d)\n", strerror(errno), rc); + printf("Write error %s (rc = %d)\n",strerror(errno),rc); return 1; } } @@ -94,7 +94,7 @@ int main(int argc, char **argv) return 1; } - rbuf = mmap(0, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, 0, 0); + rbuf =mmap(0,len,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0,0); if (rbuf == MAP_FAILED) { printf("No memory %s\n", strerror(errno)); return 1; @@ -102,7 +102,7 @@ int main(int argc, char **argv) rc = read(fd, rbuf, len); if (rc != len) { - printf("Read error: %s (rc = %d)\n", strerror(errno), rc); + printf("Read error: %s (rc = %d)\n",strerror(errno),rc); return 1; } diff --git a/lustre/tests/fsx.c b/lustre/tests/fsx.c index 0e0d198..a0f4c39 100644 --- a/lustre/tests/fsx.c +++ b/lustre/tests/fsx.c @@ -363,7 +363,7 @@ check_buffers(unsigned offset, unsigned size) if (c != t) { if (n == 0) { bad = short_at(&temp_buf[i]); - prt("0x%5x\t0x%04x\t0x%04x", offset, + prt("%#07x\t%#06x\t%#06x", offset, short_at(&good_buf[offset]), bad); op = temp_buf[offset & 1 ? i+1 : i]; } @@ -375,7 +375,7 @@ check_buffers(unsigned offset, unsigned size) size--; } if (n) { - prt("\t0x%5x\n", n); + prt("\t%#7x\n", n); if (bad) prt("operation# (mod 256) for the bad data" "may be %u\n", ((unsigned)op & 0xff)); -- 1.8.3.1