mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfsqa changes for gcc4 (for real this time)
inode number passed to bulkstat should be unsigned
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
+9
-9
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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++;
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user