aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_fs.h
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2007-10-11 21:13:22 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-07 02:13:17 -0500
commitbc58f9bb6be02a80b5f1f757b656c9affc07154f (patch)
tree1e9f4f89f1dd9cb64080e36eaec85337f2d0a0c3 /fs/xfs/xfs_fs.h
parentd4f3cc016fd6b392d483adc586b6dfaabad081af (diff)
[XFS] fix 32-bit compat ioctls for GETXFLAGS, SETXFLAGS, GETVERSION
XFS_IOC_GETVERSION, XFS_IOC_GETXFLAGS and XFS_IOC_SETXFLAGS all take a "long" which changes size between 32 and 64 bit platforms. So, the ioctl cmds that come in from a 32-bit app aren't as expected, for example on GETXFLAGS, unknown cmd fd(3) cmd(80046601){t:'f';sz:4} due to the size mismatch. So, use instead the 32-bit version of the commands for compat ioctls, and other than that it doesn't take any more manipulation. Also, for both native and compat versions, just define them to the values as defined in fs.h SGI-PV: 971186 SGI-Modid: xfs-linux-melb:xfs-kern:29849a Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_fs.h')
-rw-r--r--fs/xfs/xfs_fs.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h
index aab966276517..3bed6433d050 100644
--- a/fs/xfs/xfs_fs.h
+++ b/fs/xfs/xfs_fs.h
@@ -419,9 +419,13 @@ typedef struct xfs_handle {
419/* 419/*
420 * ioctl commands that are used by Linux filesystems 420 * ioctl commands that are used by Linux filesystems
421 */ 421 */
422#define XFS_IOC_GETXFLAGS _IOR('f', 1, long) 422#define XFS_IOC_GETXFLAGS FS_IOC_GETFLAGS
423#define XFS_IOC_SETXFLAGS _IOW('f', 2, long) 423#define XFS_IOC_SETXFLAGS FS_IOC_SETFLAGS
424#define XFS_IOC_GETVERSION _IOR('v', 1, long) 424#define XFS_IOC_GETVERSION FS_IOC_GETVERSION
425/* 32-bit compat counterparts */
426#define XFS_IOC32_GETXFLAGS FS_IOC32_GETFLAGS
427#define XFS_IOC32_SETXFLAGS FS_IOC32_SETFLAGS
428#define XFS_IOC32_GETVERSION FS_IOC32_GETVERSION
425 429
426/* 430/*
427 * ioctl commands that replace IRIX fcntl()'s 431 * ioctl commands that replace IRIX fcntl()'s