Fix fsstress builds when setting the project identifier (fsx interface now).

Merge of master-melb:xfs-cmds:23061a by kenmcd.
This commit is contained in:
Nathan Scott
2005-07-05 03:44:14 +00:00
parent fb5483e332
commit 781a49c308
+7 -1
View 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);