patch-2.4.23 linux-2.4.23/include/asm-sparc64/ioctl.h
Next file: linux-2.4.23/include/asm-sparc64/irq.h
Previous file: linux-2.4.23/include/asm-sparc64/io.h
Back to the patch index
Back to the overall index
- Lines: 11
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/include/asm-sparc64/ioctl.h
- Orig date:
2003-06-13 07:51:38.000000000 -0700
diff -urN linux-2.4.22/include/asm-sparc64/ioctl.h linux-2.4.23/include/asm-sparc64/ioctl.h
@@ -54,7 +54,9 @@
(((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) )
#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
-#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK)
+#define _IOC_SIZE(nr) \
+ ((((((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) & (_IOC_WRITE|_IOC_READ)) == 0)? \
+ 0: (((nr) >> _IOC_SIZESHIFT) & _IOC_XSIZEMASK))
/* ...and for the PCMCIA and sound. */
#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)