Skip to contentSkip to conversation

PARTIAL TAKE 971186 - fix 32-bit compat ioctls for GETXFLAGS, SETXFLAGS, GETVERSION

DISCUSSION Lachlan McIlroy 1 participant 1 message Oct 8, 2007

lore
Share & tools
lore
#0 lore raw

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

Date:  Mon Oct  8 16:42:26 AEST 2007
Workarea:  redback.melbourne.sgi.com:/home/lachlan/isms/2.6.x-oss
Inspected by:  Signed-off-by: Eric Sandeen <[email protected]>
Author:  lachlan

The following file(s) were checked into:
longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb

Modid: xfs-linux-melb:xfs-kern:29849a
fs/xfs/xfs_fs.h - 1.36 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_fs.h.diff?r1=text&tr1=1.36&r2=text&tr2=1.35&f=h
fs/xfs/linux-2.6/xfs_ioctl32.c - 1.22 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ioctl32.c.diff?r1=text&tr1=1.22&r2=text&tr2=1.21&f=h
- fix 32-bit compat ioctls for GETXFLAGS, SETXFLAGS, GETVERSION