Fix fsstress builds when setting the project identifier (fsx interface now).
authorNathan Scott <nathans@sgi.com>
Tue, 5 Jul 2005 03:44:14 +0000 (03:44 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 5 Jul 2005 03:44:14 +0000 (03:44 +0000)
Merge of master-melb:xfs-cmds:23061a by kenmcd.

ltp/fsstress.c

index d21f878cb2eaf586e8a081ce00427dffcd274a59..d1d10fc5393ed419b69d1cb79f194ae2e76d8dd2 100644 (file)
@@ -1628,6 +1628,9 @@ chown_f(int opno, long r)
 void
 chproj_f(int opno, long r)
 {
+#if !defined(__sgi__)
+       struct fsxattr  fsx;
+#endif
        int             fd;
        int             e;
        pathname_t      f;
@@ -1649,7 +1652,10 @@ chproj_f(int opno, long r)
 #if defined(__sgi__)
        e = fchproj(fd, p);
 #else
-       e = xfsctl(f.path, fd, XFS_IOC_SETPROJID, &p);
+       if ((e = xfsctl(f.path, fd, XFS_IOC_FSGETXATTR, &fsx)) == 0) {
+               fsx.fsx_projid = p;
+               e = xfsctl(f.path, fd, XFS_IOC_FSSETXATTR, &fsx);
+       }
 #endif
        if (v)
                printf("%d/%d: chproj %s %u %d\n", procid, opno, f.path, p, e);