__u32 fsx_xflags; /* xflags field value (get/set) */
__u32 fsx_extsize; /* extsize field value (get/set)*/
__u32 fsx_nextents; /* nextents field value (get) */
- unsigned char fsx_pad[16];
+ __u32 fsx_projid; /* project identifier (get/set) */
+ unsigned char fsx_pad[12];
};
#endif
/* XFS_IOC_SETBIOSIZE ---- deprecated 46 */
/* XFS_IOC_GETBIOSIZE ---- deprecated 47 */
#define XFS_IOC_GETBMAPX _IOWR('X', 56, struct getbmap)
-#define XFS_IOC_SETPROJID _IOWR('X', 57, __uint32_t)
-#define XFS_IOC_GETPROJID _IOWR('X', 58, __uint32_t)
/*
* ioctl commands that replace IRIX syssgi()'s
}
*projid = st.st_projid;
#else
- if (xfsctl(name, fd, XFS_IOC_GETPROJID, projid)) {
- perror("XFS_IOC_GETPROJID");
+ struct fsxattr fsx;
+ if (xfsctl(name, fd, XFS_IOC_FSGETXATTR, &fsx)) {
+ perror("XFS_IOC_FSGETXATTR");
return -1;
}
+ *projid = fsx.fsx_projid;
#endif
return 0;
}
#if defined(__sgi__)
return fchproj(fd, projid);
#else
- return xfsctl(name, fd, XFS_IOC_SETPROJID, &projid);
+ struct fsxattr fsx;
+ int error;
+
+ if ((error = xfsctl(name, fd, XFS_IOC_FSGETXATTR, &fsx)) == 0) {
+ fsx.fsx_projid = projid;
+ error = xfsctl(name, fd, XFS_IOC_FSSETXATTR, &fsx);
+ }
+ return error;
#endif
}