xfsqa changes for gcc4 (for real this time)
authorChristoph Hellwig <hch@sgi.com>
Mon, 18 Apr 2005 18:35:33 +0000 (18:35 +0000)
committerChristoph Hellwig <hch@sgi.com>
Mon, 18 Apr 2005 18:35:33 +0000 (18:35 +0000)
inode number passed to bulkstat should be unsigned

src/bstat.c
src/godown.c
src/t_immutable.c
src/writemod.c

index 6f8c669b2bfa5e58a6c9b53eca548ac2646f9bb3..46fb1e90da6488bf08259c6fc0c6d5cbb1de3a4a 100644 (file)
@@ -83,7 +83,7 @@ main(int argc, char **argv)
        int             total = 0;
        int             fsfd;
        int             i;
        int             total = 0;
        int             fsfd;
        int             i;
-       __s64           last = 0;
+       __u64           last = 0;
        char            *name;
        int             nent;
        int             debug = 0;
        char            *name;
        int             nent;
        int             debug = 0;
index 0f15b44903594693877f5ed5c3e6f32259c98360..6cbbfd251cd09fa2d9a63304c20d376c4794ab0d 100644 (file)
 #define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH  0x2     /* don't flush log */
 #endif
 
 #define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH  0x2     /* don't flush log */
 #endif
 
-static char *progname;
+static char *xprogname;
 
 
 static void
 usage(void)
 {
 
 
 static void
 usage(void)
 {
-       fprintf(stderr, "usage: %s [-f] [-v] mnt-dir\n", progname);
+       fprintf(stderr, "usage: %s [-f] [-v] mnt-dir\n", xprogname);
 }
 
 int
 }
 
 int
@@ -66,7 +66,7 @@ main(int argc, char *argv[])
        char *mnt_dir;
        int fd;
 
        char *mnt_dir;
        int fd;
 
-       progname = argv[0];
+       xprogname = argv[0];
 
        while ((c = getopt(argc, argv, "fv")) != -1) {
                switch (c) {
 
        while ((c = getopt(argc, argv, "fv")) != -1) {
                switch (c) {
@@ -93,13 +93,13 @@ main(int argc, char *argv[])
 
        if ((stat(mnt_dir, &st)) == -1) {
                fprintf(stderr, "%s: error on stat \"%s\": %s\n",
 
        if ((stat(mnt_dir, &st)) == -1) {
                fprintf(stderr, "%s: error on stat \"%s\": %s\n",
-                       progname, mnt_dir, strerror(errno));
+                       xprogname, mnt_dir, strerror(errno));
                return 1;
        }
 
        if (!S_ISDIR(st.st_mode)) {
                fprintf(stderr, "%s: argument \"%s\" is not a directory\n",
                return 1;
        }
 
        if (!S_ISDIR(st.st_mode)) {
                fprintf(stderr, "%s: argument \"%s\" is not a directory\n",
-                       progname, mnt_dir);
+                       xprogname, mnt_dir);
                return 1;
        }
 
                return 1;
        }
 
@@ -109,13 +109,13 @@ main(int argc, char *argv[])
                struct statvfs stvfs;
                if ((statvfs(mnt_dir, &stvfs)) == -1) {
                        fprintf(stderr, "%s: error on statfs \"%s\": %s\n",
                struct statvfs stvfs;
                if ((statvfs(mnt_dir, &stvfs)) == -1) {
                        fprintf(stderr, "%s: error on statfs \"%s\": %s\n",
-                               progname, mnt_dir, strerror(errno));
+                               xprogname, mnt_dir, strerror(errno));
                        return 1;
                }
 
                if (strcmp(stvfs.f_basetype, "xfs") != 0) {
                        fprintf(stderr, "%s: filesys for \"%s\" is not XFS:\"%s\"\n",
                        return 1;
                }
 
                if (strcmp(stvfs.f_basetype, "xfs") != 0) {
                        fprintf(stderr, "%s: filesys for \"%s\" is not XFS:\"%s\"\n",
-                               progname, mnt_dir, stvfs.f_basetype);
+                               xprogname, mnt_dir, stvfs.f_basetype);
                        return 1;
                }
        }
                        return 1;
                }
        }
@@ -130,7 +130,7 @@ main(int argc, char *argv[])
        }
        if ((fd = open(mnt_dir, O_RDONLY)) == -1) {
                fprintf(stderr, "%s: error on open of \"%s\": %s\n",
        }
        if ((fd = open(mnt_dir, O_RDONLY)) == -1) {
                fprintf(stderr, "%s: error on open of \"%s\": %s\n",
-                       progname, mnt_dir, strerror(errno));
+                       xprogname, mnt_dir, strerror(errno));
                return 1;
        }
 
                return 1;
        }
 
@@ -139,7 +139,7 @@ main(int argc, char *argv[])
        }
        if ((xfsctl(mnt_dir, fd, XFS_IOC_GOINGDOWN, &flag)) == -1) {
                fprintf(stderr, "%s: error on xfsctl(GOINGDOWN) of \"%s\": %s\n",
        }
        if ((xfsctl(mnt_dir, fd, XFS_IOC_GOINGDOWN, &flag)) == -1) {
                fprintf(stderr, "%s: error on xfsctl(GOINGDOWN) of \"%s\": %s\n",
-                       progname, mnt_dir, strerror(errno));
+                       xprogname, mnt_dir, strerror(errno));
                return 1;
        }
 
                return 1;
        }
 
index a8c43d7d8caacb2dcc21502cc9a7678acfe35652..da26896e6d4406935d9eb41d17750d079e5c0227 100644 (file)
@@ -571,7 +571,7 @@ static int test_immutable(const char *dir)
          }
          close(fd);
      }
          }
          close(fd);
      }
-     if (!getuid) {
+     if (!getuid()) {
          if (chmod(path, 0777) == -1) {
               fprintf(stderr, "chmod(%s, 0777) failed: %s\n", path, strerror(errno));
               fail++;
          if (chmod(path, 0777) == -1) {
               fprintf(stderr, "chmod(%s, 0777) failed: %s\n", path, strerror(errno));
               fail++;
@@ -1519,7 +1519,7 @@ static int test_append(const char *dir)
          }
          close(fd);
      }
          }
          close(fd);
      }
-     if (!getuid) {
+     if (!getuid()) {
          if (chmod(path, 0777) == -1) {
               fprintf(stderr, "chmod(%s, 0777) failed: %s\n", path, strerror(errno));
               fail++;
          if (chmod(path, 0777) == -1) {
               fprintf(stderr, "chmod(%s, 0777) failed: %s\n", path, strerror(errno));
               fail++;
index bb6d434c2ad7e802d79c233f410db3f64960f1f6..1b4b922463b5fd4a5c71f0ab5673ff1e9defb8d1 100644 (file)
@@ -40,6 +40,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <string.h>
 #include <fcntl.h>
 #include <stdio.h>
 
 #include <fcntl.h>
 #include <stdio.h>