Whamcloud - gitweb
land b1_5 onto HEAD
[fs/lustre-release.git] / lustre / tests / fsx.c
index 0e0d198..6cf43ee 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));
@@ -531,7 +531,10 @@ check_trunc_hack(void)
 
        ftruncate(fd, (off_t)0);
        ftruncate(fd, (off_t)100000);
-       fstat(fd, &statbuf);
+       if (fstat(fd, &statbuf)) {
+               prterr("trunc_hack: fstat");
+               statbuf.st_size = -1;
+       }
        if (statbuf.st_size != (off_t)100000) {
                prt("no extend on truncate! not posix!\n");
                exit(130);