ioctl command decoding macros - useful for drivers --- dev/include/ioctl.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dev/include/ioctl.h b/dev/include/ioctl.h index eae0fae..36ae8b4 100755 --- a/dev/include/ioctl.h +++ b/dev/include/ioctl.h @@ -48,4 +48,8 @@ #define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t)) #define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) +#define _IOC_SIZE(cmd) (((cmd)>>16) & IOCPARM_MASK) +#define _IOC_TYPE(cmd) (((cmd)>>8) & 0xFF) +#define _IOC_NR(cmd) ((cmd)&0xFF) + #endif /* !_IOCTL_H */ -- 1.5.0.3.GIT ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Prex-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/prex-devel
