From 37756c35d1ae945739c1c4fb641f393c1e41d12d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 18 Apr 2005 18:35:33 +0000 Subject: [PATCH] xfsqa changes for gcc4 (for real this time) inode number passed to bulkstat should be unsigned --- src/bstat.c | 2 +- src/godown.c | 18 +++++++++--------- src/t_immutable.c | 4 ++-- src/writemod.c | 1 + 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/bstat.c b/src/bstat.c index 6f8c669b2..46fb1e90d 100644 --- a/src/bstat.c +++ b/src/bstat.c @@ -83,7 +83,7 @@ main(int argc, char **argv) int total = 0; int fsfd; int i; - __s64 last = 0; + __u64 last = 0; char *name; int nent; int debug = 0; diff --git a/src/godown.c b/src/godown.c index 0f15b4490..6cbbfd251 100644 --- a/src/godown.c +++ b/src/godown.c @@ -46,13 +46,13 @@ #define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH 0x2 /* don't flush log */ #endif -static char *progname; +static char *xprogname; 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 @@ -66,7 +66,7 @@ main(int argc, char *argv[]) char *mnt_dir; int fd; - progname = argv[0]; + xprogname = argv[0]; 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", - 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", - progname, mnt_dir); + xprogname, mnt_dir); 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", - 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", - progname, mnt_dir, stvfs.f_basetype); + xprogname, mnt_dir, stvfs.f_basetype); 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", - progname, mnt_dir, strerror(errno)); + xprogname, mnt_dir, strerror(errno)); 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", - progname, mnt_dir, strerror(errno)); + xprogname, mnt_dir, strerror(errno)); return 1; } diff --git a/src/t_immutable.c b/src/t_immutable.c index a8c43d7d8..da26896e6 100644 --- a/src/t_immutable.c +++ b/src/t_immutable.c @@ -571,7 +571,7 @@ static int test_immutable(const char *dir) } close(fd); } - if (!getuid) { + if (!getuid()) { 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); } - if (!getuid) { + if (!getuid()) { if (chmod(path, 0777) == -1) { fprintf(stderr, "chmod(%s, 0777) failed: %s\n", path, strerror(errno)); fail++; diff --git a/src/writemod.c b/src/writemod.c index bb6d434c2..1b4b92246 100644 --- a/src/writemod.c +++ b/src/writemod.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include -- 2.51.0