Whamcloud - gitweb
Branch: b1_4
authoradilger <adilger>
Tue, 12 Apr 2005 09:31:49 +0000 (09:31 +0000)
committeradilger <adilger>
Tue, 12 Apr 2005 09:31:49 +0000 (09:31 +0000)
Fix up offset printing for fsx.

lustre/tests/directio.c
lustre/tests/fsx.c

index 8896f15..933c988 100644 (file)
@@ -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;
                 }
 
index 0e0d198..a0f4c39 100644 (file)
@@ -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));