aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsandeen@sandeen.net <sandeen@sandeen.net>2008-11-25 22:20:07 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-12-02 01:08:44 -0500
commitffae263a640b736a7206a0d7bd14ab44eb58cd28 (patch)
tree50befe3c25e6f01459d9968a4139f171e2e097b0
parent743bb4650da9e2595d6cedd01c680b5b9398c74a (diff)
[XFS] Move compat ioctl structs & numbers into xfs_ioctl32.h
This makes the c file less cluttered and a bit more readable. Consistently name the ioctl number macros with "_32" and the compatibility stuctures with "_compat." Rename the helpers which simply copy in the arg with "_copyin" for easy identification. Finally, for a few of the existing helpers, modify them so that they directly call the native ioctl helper after userspace argument fixup. Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.c140
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.h145
-rw-r--r--fs/xfs/xfs_fs.h4
3 files changed, 150 insertions, 139 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c
index 6ce9c9c7cdde..620bb2d6d26c 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.c
@@ -48,36 +48,12 @@
48#define _NATIVE_IOC(cmd, type) \ 48#define _NATIVE_IOC(cmd, type) \
49 _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type)) 49 _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type))
50 50
51#if defined(CONFIG_IA64) || defined(CONFIG_X86_64) 51#ifdef BROKEN_X86_ALIGNMENT
52#define BROKEN_X86_ALIGNMENT
53#define _PACKED __attribute__((packed))
54/* on ia32 l_start is on a 32-bit boundary */
55typedef struct xfs_flock64_32 {
56 __s16 l_type;
57 __s16 l_whence;
58 __s64 l_start __attribute__((packed));
59 /* len == 0 means until end of file */
60 __s64 l_len __attribute__((packed));
61 __s32 l_sysid;
62 __u32 l_pid;
63 __s32 l_pad[4]; /* reserve area */
64} xfs_flock64_32_t;
65
66#define XFS_IOC_ALLOCSP_32 _IOW ('X', 10, struct xfs_flock64_32)
67#define XFS_IOC_FREESP_32 _IOW ('X', 11, struct xfs_flock64_32)
68#define XFS_IOC_ALLOCSP64_32 _IOW ('X', 36, struct xfs_flock64_32)
69#define XFS_IOC_FREESP64_32 _IOW ('X', 37, struct xfs_flock64_32)
70#define XFS_IOC_RESVSP_32 _IOW ('X', 40, struct xfs_flock64_32)
71#define XFS_IOC_UNRESVSP_32 _IOW ('X', 41, struct xfs_flock64_32)
72#define XFS_IOC_RESVSP64_32 _IOW ('X', 42, struct xfs_flock64_32)
73#define XFS_IOC_UNRESVSP64_32 _IOW ('X', 43, struct xfs_flock64_32)
74
75/* just account for different alignment */
76STATIC unsigned long 52STATIC unsigned long
77xfs_ioctl32_flock( 53xfs_ioctl32_flock(
78 unsigned long arg) 54 unsigned long arg)
79{ 55{
80 xfs_flock64_32_t __user *p32 = (void __user *)arg; 56 compat_xfs_flock64_t __user *p32 = (void __user *)arg;
81 xfs_flock64_t __user *p = compat_alloc_user_space(sizeof(*p)); 57 xfs_flock64_t __user *p = compat_alloc_user_space(sizeof(*p));
82 58
83 if (copy_in_user(&p->l_type, &p32->l_type, sizeof(s16)) || 59 if (copy_in_user(&p->l_type, &p32->l_type, sizeof(s16)) ||
@@ -92,32 +68,6 @@ xfs_ioctl32_flock(
92 return (unsigned long)p; 68 return (unsigned long)p;
93} 69}
94 70
95typedef struct compat_xfs_fsop_geom_v1 {
96 __u32 blocksize; /* filesystem (data) block size */
97 __u32 rtextsize; /* realtime extent size */
98 __u32 agblocks; /* fsblocks in an AG */
99 __u32 agcount; /* number of allocation groups */
100 __u32 logblocks; /* fsblocks in the log */
101 __u32 sectsize; /* (data) sector size, bytes */
102 __u32 inodesize; /* inode size in bytes */
103 __u32 imaxpct; /* max allowed inode space(%) */
104 __u64 datablocks; /* fsblocks in data subvolume */
105 __u64 rtblocks; /* fsblocks in realtime subvol */
106 __u64 rtextents; /* rt extents in realtime subvol*/
107 __u64 logstart; /* starting fsblock of the log */
108 unsigned char uuid[16]; /* unique id of the filesystem */
109 __u32 sunit; /* stripe unit, fsblocks */
110 __u32 swidth; /* stripe width, fsblocks */
111 __s32 version; /* structure version */
112 __u32 flags; /* superblock version flags */
113 __u32 logsectsize; /* log sector size, bytes */
114 __u32 rtsectsize; /* realtime sector size, bytes */
115 __u32 dirblocksize; /* directory block size, bytes */
116} __attribute__((packed)) compat_xfs_fsop_geom_v1_t;
117
118#define XFS_IOC_FSGEOMETRY_V1_32 \
119 _IOR ('X', 100, struct compat_xfs_fsop_geom_v1)
120
121STATIC unsigned long xfs_ioctl32_geom_v1(unsigned long arg) 71STATIC unsigned long xfs_ioctl32_geom_v1(unsigned long arg)
122{ 72{
123 compat_xfs_fsop_geom_v1_t __user *p32 = (void __user *)arg; 73 compat_xfs_fsop_geom_v1_t __user *p32 = (void __user *)arg;
@@ -128,12 +78,6 @@ STATIC unsigned long xfs_ioctl32_geom_v1(unsigned long arg)
128 return (unsigned long)p; 78 return (unsigned long)p;
129} 79}
130 80
131typedef struct compat_xfs_inogrp {
132 __u64 xi_startino; /* starting inode number */
133 __s32 xi_alloccount; /* # bits set in allocmask */
134 __u64 xi_allocmask; /* mask of allocated inodes */
135} __attribute__((packed)) compat_xfs_inogrp_t;
136
137STATIC int xfs_inumbers_fmt_compat( 81STATIC int xfs_inumbers_fmt_compat(
138 void __user *ubuffer, 82 void __user *ubuffer,
139 const xfs_inogrp_t *buffer, 83 const xfs_inogrp_t *buffer,
@@ -154,19 +98,11 @@ STATIC int xfs_inumbers_fmt_compat(
154} 98}
155 99
156#else 100#else
157
158#define xfs_inumbers_fmt_compat xfs_inumbers_fmt 101#define xfs_inumbers_fmt_compat xfs_inumbers_fmt
159#define _PACKED
160
161#endif 102#endif
162 103
163/* XFS_IOC_FSBULKSTAT and friends */ 104/* XFS_IOC_FSBULKSTAT and friends */
164 105
165typedef struct compat_xfs_bstime {
166 __s32 tv_sec; /* seconds */
167 __s32 tv_nsec; /* and nanoseconds */
168} compat_xfs_bstime_t;
169
170STATIC int xfs_bstime_store_compat( 106STATIC int xfs_bstime_store_compat(
171 compat_xfs_bstime_t __user *p32, 107 compat_xfs_bstime_t __user *p32,
172 const xfs_bstime_t *p) 108 const xfs_bstime_t *p)
@@ -180,30 +116,6 @@ STATIC int xfs_bstime_store_compat(
180 return 0; 116 return 0;
181} 117}
182 118
183typedef struct compat_xfs_bstat {
184 __u64 bs_ino; /* inode number */
185 __u16 bs_mode; /* type and mode */
186 __u16 bs_nlink; /* number of links */
187 __u32 bs_uid; /* user id */
188 __u32 bs_gid; /* group id */
189 __u32 bs_rdev; /* device value */
190 __s32 bs_blksize; /* block size */
191 __s64 bs_size; /* file size */
192 compat_xfs_bstime_t bs_atime; /* access time */
193 compat_xfs_bstime_t bs_mtime; /* modify time */
194 compat_xfs_bstime_t bs_ctime; /* inode change time */
195 int64_t bs_blocks; /* number of blocks */
196 __u32 bs_xflags; /* extended flags */
197 __s32 bs_extsize; /* extent size */
198 __s32 bs_extents; /* number of extents */
199 __u32 bs_gen; /* generation count */
200 __u16 bs_projid; /* project id */
201 unsigned char bs_pad[14]; /* pad space, unused */
202 __u32 bs_dmevmask; /* DMIG event mask */
203 __u16 bs_dmstate; /* DMIG state info */
204 __u16 bs_aextents; /* attribute number of extents */
205} _PACKED compat_xfs_bstat_t;
206
207STATIC int xfs_bulkstat_one_fmt_compat( 119STATIC int xfs_bulkstat_one_fmt_compat(
208 void __user *ubuffer, 120 void __user *ubuffer,
209 const xfs_bstat_t *buffer) 121 const xfs_bstat_t *buffer)
@@ -234,22 +146,6 @@ STATIC int xfs_bulkstat_one_fmt_compat(
234 return sizeof(*p32); 146 return sizeof(*p32);
235} 147}
236 148
237
238
239typedef struct compat_xfs_fsop_bulkreq {
240 compat_uptr_t lastip; /* last inode # pointer */
241 __s32 icount; /* count of entries in buffer */
242 compat_uptr_t ubuffer; /* user buffer for inode desc. */
243 compat_uptr_t ocount; /* output count pointer */
244} compat_xfs_fsop_bulkreq_t;
245
246#define XFS_IOC_FSBULKSTAT_32 \
247 _IOWR('X', 101, struct compat_xfs_fsop_bulkreq)
248#define XFS_IOC_FSBULKSTAT_SINGLE_32 \
249 _IOWR('X', 102, struct compat_xfs_fsop_bulkreq)
250#define XFS_IOC_FSINUMBERS_32 \
251 _IOWR('X', 103, struct compat_xfs_fsop_bulkreq)
252
253/* copied from xfs_ioctl.c */ 149/* copied from xfs_ioctl.c */
254STATIC int 150STATIC int
255xfs_ioc_bulkstat_compat( 151xfs_ioc_bulkstat_compat(
@@ -320,29 +216,6 @@ xfs_ioc_bulkstat_compat(
320 return 0; 216 return 0;
321} 217}
322 218
323
324
325typedef struct compat_xfs_fsop_handlereq {
326 __u32 fd; /* fd for FD_TO_HANDLE */
327 compat_uptr_t path; /* user pathname */
328 __u32 oflags; /* open flags */
329 compat_uptr_t ihandle; /* user supplied handle */
330 __u32 ihandlen; /* user supplied length */
331 compat_uptr_t ohandle; /* user buffer for handle */
332 compat_uptr_t ohandlen; /* user buffer length */
333} compat_xfs_fsop_handlereq_t;
334
335#define XFS_IOC_PATH_TO_FSHANDLE_32 \
336 _IOWR('X', 104, struct compat_xfs_fsop_handlereq)
337#define XFS_IOC_PATH_TO_HANDLE_32 \
338 _IOWR('X', 105, struct compat_xfs_fsop_handlereq)
339#define XFS_IOC_FD_TO_HANDLE_32 \
340 _IOWR('X', 106, struct compat_xfs_fsop_handlereq)
341#define XFS_IOC_OPEN_BY_HANDLE_32 \
342 _IOWR('X', 107, struct compat_xfs_fsop_handlereq)
343#define XFS_IOC_READLINK_BY_HANDLE_32 \
344 _IOWR('X', 108, struct compat_xfs_fsop_handlereq)
345
346STATIC unsigned long xfs_ioctl32_fshandle(unsigned long arg) 219STATIC unsigned long xfs_ioctl32_fshandle(unsigned long arg)
347{ 220{
348 compat_xfs_fsop_handlereq_t __user *p32 = (void __user *)arg; 221 compat_xfs_fsop_handlereq_t __user *p32 = (void __user *)arg;
@@ -365,7 +238,6 @@ STATIC unsigned long xfs_ioctl32_fshandle(unsigned long arg)
365 return (unsigned long)p; 238 return (unsigned long)p;
366} 239}
367 240
368
369STATIC long 241STATIC long
370xfs_compat_ioctl( 242xfs_compat_ioctl(
371 int mode, 243 int mode,
@@ -404,9 +276,9 @@ xfs_compat_ioctl(
404 case XFS_IOC_ERROR_CLEARALL: 276 case XFS_IOC_ERROR_CLEARALL:
405 break; 277 break;
406 278
407 case XFS_IOC32_GETXFLAGS: 279 case XFS_IOC_GETXFLAGS_32:
408 case XFS_IOC32_SETXFLAGS: 280 case XFS_IOC_SETXFLAGS_32:
409 case XFS_IOC32_GETVERSION: 281 case XFS_IOC_GETVERSION_32:
410 cmd = _NATIVE_IOC(cmd, long); 282 cmd = _NATIVE_IOC(cmd, long);
411 break; 283 break;
412#ifdef BROKEN_X86_ALIGNMENT 284#ifdef BROKEN_X86_ALIGNMENT
@@ -426,7 +298,6 @@ xfs_compat_ioctl(
426 arg = xfs_ioctl32_geom_v1(arg); 298 arg = xfs_ioctl32_geom_v1(arg);
427 cmd = _NATIVE_IOC(cmd, struct xfs_fsop_geom_v1); 299 cmd = _NATIVE_IOC(cmd, struct xfs_fsop_geom_v1);
428 break; 300 break;
429
430#else /* These are handled fine if no alignment issues */ 301#else /* These are handled fine if no alignment issues */
431 case XFS_IOC_ALLOCSP: 302 case XFS_IOC_ALLOCSP:
432 case XFS_IOC_FREESP: 303 case XFS_IOC_FREESP:
@@ -464,7 +335,6 @@ xfs_compat_ioctl(
464 335
465 error = xfs_ioctl(XFS_I(inode), file, mode, cmd, (void __user *)arg); 336 error = xfs_ioctl(XFS_I(inode), file, mode, cmd, (void __user *)arg);
466 xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED); 337 xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED);
467
468 return error; 338 return error;
469} 339}
470 340
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.h b/fs/xfs/linux-2.6/xfs_ioctl32.h
index 02de6e62ee37..003a10e695be 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.h
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.h
@@ -18,7 +18,152 @@
18#ifndef __XFS_IOCTL32_H__ 18#ifndef __XFS_IOCTL32_H__
19#define __XFS_IOCTL32_H__ 19#define __XFS_IOCTL32_H__
20 20
21#include <linux/compat.h>
22
21extern long xfs_file_compat_ioctl(struct file *, unsigned, unsigned long); 23extern long xfs_file_compat_ioctl(struct file *, unsigned, unsigned long);
22extern long xfs_file_compat_invis_ioctl(struct file *, unsigned, unsigned long); 24extern long xfs_file_compat_invis_ioctl(struct file *, unsigned, unsigned long);
23 25
26/*
27 * on 32-bit arches, ioctl argument structures may have different sizes
28 * and/or alignment. We define compat structures which match the
29 * 32-bit sizes/alignments here, and their associated ioctl numbers.
30 *
31 * xfs_ioctl32.c contains routines to copy these structures in and out.
32 */
33
34/* stock kernel-level ioctls we support */
35#define XFS_IOC_GETXFLAGS_32 FS_IOC32_GETFLAGS
36#define XFS_IOC_SETXFLAGS_32 FS_IOC32_SETFLAGS
37#define XFS_IOC_GETVERSION_32 FS_IOC32_GETVERSION
38
39/*
40 * On intel, even if sizes match, alignment and/or padding may differ.
41 */
42#if defined(CONFIG_IA64) || defined(CONFIG_X86_64)
43#define BROKEN_X86_ALIGNMENT
44#define __compat_packed __attribute__((packed))
45#else
46#define __compat_packed
47#endif
48
49typedef struct compat_xfs_bstime {
50 compat_time_t tv_sec; /* seconds */
51 __s32 tv_nsec; /* and nanoseconds */
52} compat_xfs_bstime_t;
53
54typedef struct compat_xfs_bstat {
55 __u64 bs_ino; /* inode number */
56 __u16 bs_mode; /* type and mode */
57 __u16 bs_nlink; /* number of links */
58 __u32 bs_uid; /* user id */
59 __u32 bs_gid; /* group id */
60 __u32 bs_rdev; /* device value */
61 __s32 bs_blksize; /* block size */
62 __s64 bs_size; /* file size */
63 compat_xfs_bstime_t bs_atime; /* access time */
64 compat_xfs_bstime_t bs_mtime; /* modify time */
65 compat_xfs_bstime_t bs_ctime; /* inode change time */
66 int64_t bs_blocks; /* number of blocks */
67 __u32 bs_xflags; /* extended flags */
68 __s32 bs_extsize; /* extent size */
69 __s32 bs_extents; /* number of extents */
70 __u32 bs_gen; /* generation count */
71 __u16 bs_projid; /* project id */
72 unsigned char bs_pad[14]; /* pad space, unused */
73 __u32 bs_dmevmask; /* DMIG event mask */
74 __u16 bs_dmstate; /* DMIG state info */
75 __u16 bs_aextents; /* attribute number of extents */
76} __compat_packed compat_xfs_bstat_t;
77
78typedef struct compat_xfs_fsop_bulkreq {
79 compat_uptr_t lastip; /* last inode # pointer */
80 __s32 icount; /* count of entries in buffer */
81 compat_uptr_t ubuffer; /* user buffer for inode desc. */
82 compat_uptr_t ocount; /* output count pointer */
83} compat_xfs_fsop_bulkreq_t;
84
85#define XFS_IOC_FSBULKSTAT_32 \
86 _IOWR('X', 101, struct compat_xfs_fsop_bulkreq)
87#define XFS_IOC_FSBULKSTAT_SINGLE_32 \
88 _IOWR('X', 102, struct compat_xfs_fsop_bulkreq)
89#define XFS_IOC_FSINUMBERS_32 \
90 _IOWR('X', 103, struct compat_xfs_fsop_bulkreq)
91
92typedef struct compat_xfs_fsop_handlereq {
93 __u32 fd; /* fd for FD_TO_HANDLE */
94 compat_uptr_t path; /* user pathname */
95 __u32 oflags; /* open flags */
96 compat_uptr_t ihandle; /* user supplied handle */
97 __u32 ihandlen; /* user supplied length */
98 compat_uptr_t ohandle; /* user buffer for handle */
99 compat_uptr_t ohandlen; /* user buffer length */
100} compat_xfs_fsop_handlereq_t;
101
102#define XFS_IOC_PATH_TO_FSHANDLE_32 \
103 _IOWR('X', 104, struct compat_xfs_fsop_handlereq)
104#define XFS_IOC_PATH_TO_HANDLE_32 \
105 _IOWR('X', 105, struct compat_xfs_fsop_handlereq)
106#define XFS_IOC_FD_TO_HANDLE_32 \
107 _IOWR('X', 106, struct compat_xfs_fsop_handlereq)
108#define XFS_IOC_OPEN_BY_HANDLE_32 \
109 _IOWR('X', 107, struct compat_xfs_fsop_handlereq)
110#define XFS_IOC_READLINK_BY_HANDLE_32 \
111 _IOWR('X', 108, struct compat_xfs_fsop_handlereq)
112
113#ifdef BROKEN_X86_ALIGNMENT
114/* on ia32 l_start is on a 32-bit boundary */
115typedef struct compat_xfs_flock64 {
116 __s16 l_type;
117 __s16 l_whence;
118 __s64 l_start __attribute__((packed));
119 /* len == 0 means until end of file */
120 __s64 l_len __attribute__((packed));
121 __s32 l_sysid;
122 __u32 l_pid;
123 __s32 l_pad[4]; /* reserve area */
124} compat_xfs_flock64_t;
125
126#define XFS_IOC_ALLOCSP_32 _IOW('X', 10, struct compat_xfs_flock64)
127#define XFS_IOC_FREESP_32 _IOW('X', 11, struct compat_xfs_flock64)
128#define XFS_IOC_ALLOCSP64_32 _IOW('X', 36, struct compat_xfs_flock64)
129#define XFS_IOC_FREESP64_32 _IOW('X', 37, struct compat_xfs_flock64)
130#define XFS_IOC_RESVSP_32 _IOW('X', 40, struct compat_xfs_flock64)
131#define XFS_IOC_UNRESVSP_32 _IOW('X', 41, struct compat_xfs_flock64)
132#define XFS_IOC_RESVSP64_32 _IOW('X', 42, struct compat_xfs_flock64)
133#define XFS_IOC_UNRESVSP64_32 _IOW('X', 43, struct compat_xfs_flock64)
134
135typedef struct compat_xfs_fsop_geom_v1 {
136 __u32 blocksize; /* filesystem (data) block size */
137 __u32 rtextsize; /* realtime extent size */
138 __u32 agblocks; /* fsblocks in an AG */
139 __u32 agcount; /* number of allocation groups */
140 __u32 logblocks; /* fsblocks in the log */
141 __u32 sectsize; /* (data) sector size, bytes */
142 __u32 inodesize; /* inode size in bytes */
143 __u32 imaxpct; /* max allowed inode space(%) */
144 __u64 datablocks; /* fsblocks in data subvolume */
145 __u64 rtblocks; /* fsblocks in realtime subvol */
146 __u64 rtextents; /* rt extents in realtime subvol*/
147 __u64 logstart; /* starting fsblock of the log */
148 unsigned char uuid[16]; /* unique id of the filesystem */
149 __u32 sunit; /* stripe unit, fsblocks */
150 __u32 swidth; /* stripe width, fsblocks */
151 __s32 version; /* structure version */
152 __u32 flags; /* superblock version flags */
153 __u32 logsectsize; /* log sector size, bytes */
154 __u32 rtsectsize; /* realtime sector size, bytes */
155 __u32 dirblocksize; /* directory block size, bytes */
156} __attribute__((packed)) compat_xfs_fsop_geom_v1_t;
157
158#define XFS_IOC_FSGEOMETRY_V1_32 \
159 _IOR('X', 100, struct compat_xfs_fsop_geom_v1)
160
161typedef struct compat_xfs_inogrp {
162 __u64 xi_startino; /* starting inode number */
163 __s32 xi_alloccount; /* # bits set in allocmask */
164 __u64 xi_allocmask; /* mask of allocated inodes */
165} __attribute__((packed)) compat_xfs_inogrp_t;
166
167#endif /* BROKEN_X86_ALIGNMENT */
168
24#endif /* __XFS_IOCTL32_H__ */ 169#endif /* __XFS_IOCTL32_H__ */
diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h
index 4ae03bae992f..589c41c38446 100644
--- a/fs/xfs/xfs_fs.h
+++ b/fs/xfs/xfs_fs.h
@@ -418,10 +418,6 @@ typedef struct xfs_handle {
418#define XFS_IOC_GETXFLAGS FS_IOC_GETFLAGS 418#define XFS_IOC_GETXFLAGS FS_IOC_GETFLAGS
419#define XFS_IOC_SETXFLAGS FS_IOC_SETFLAGS 419#define XFS_IOC_SETXFLAGS FS_IOC_SETFLAGS
420#define XFS_IOC_GETVERSION FS_IOC_GETVERSION 420#define XFS_IOC_GETVERSION FS_IOC_GETVERSION
421/* 32-bit compat counterparts */
422#define XFS_IOC32_GETXFLAGS FS_IOC32_GETFLAGS
423#define XFS_IOC32_SETXFLAGS FS_IOC32_SETFLAGS
424#define XFS_IOC32_GETVERSION FS_IOC32_GETVERSION
425 421
426/* 422/*
427 * ioctl commands that replace IRIX fcntl()'s 423 * ioctl commands that replace IRIX fcntl()'s