aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_ioctl32.h
diff options
context:
space:
mode:
authorsandeen@sandeen.net <sandeen@sandeen.net>2008-11-25 22:20:09 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-12-02 01:10:04 -0500
commite94fc4a43e5c39f689e83caf6d2f0939081f5e6b (patch)
tree8c076b71376488d7829f6c992d5e5ee545be9e19 /fs/xfs/linux-2.6/xfs_ioctl32.h
parentd5547f9feea459dfc9e7313bd1d561394e2c129f (diff)
[XFS] Add compat handlers for swapext ioctl
The big hitter here was the bstat field, which contains different sized time_t on 32 vs. 64 bit. Add a copyin function to translate the 32-bit arg to 64-bit, and call the swapext ioctl helper. Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl32.h')
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.h b/fs/xfs/linux-2.6/xfs_ioctl32.h
index 003a10e695be..bf08ab12a6f8 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.h
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.h
@@ -110,6 +110,19 @@ typedef struct compat_xfs_fsop_handlereq {
110#define XFS_IOC_READLINK_BY_HANDLE_32 \ 110#define XFS_IOC_READLINK_BY_HANDLE_32 \
111 _IOWR('X', 108, struct compat_xfs_fsop_handlereq) 111 _IOWR('X', 108, struct compat_xfs_fsop_handlereq)
112 112
113/* The bstat field in the swapext struct needs translation */
114typedef struct compat_xfs_swapext {
115 __int64_t sx_version; /* version */
116 __int64_t sx_fdtarget; /* fd of target file */
117 __int64_t sx_fdtmp; /* fd of tmp file */
118 xfs_off_t sx_offset; /* offset into file */
119 xfs_off_t sx_length; /* leng from offset */
120 char sx_pad[16]; /* pad space, unused */
121 compat_xfs_bstat_t sx_stat; /* stat of target b4 copy */
122} __compat_packed compat_xfs_swapext_t;
123
124#define XFS_IOC_SWAPEXT_32 _IOWR('X', 109, struct compat_xfs_swapext)
125
113#ifdef BROKEN_X86_ALIGNMENT 126#ifdef BROKEN_X86_ALIGNMENT
114/* on ia32 l_start is on a 32-bit boundary */ 127/* on ia32 l_start is on a 32-bit boundary */
115typedef struct compat_xfs_flock64 { 128typedef struct compat_xfs_flock64 {