diff options
| author | Szabolcs Nagy <nsz@port70.net> | 2013-05-26 15:49:08 +0000 |
|---|---|---|
| committer | Szabolcs Nagy <nsz@port70.net> | 2013-05-26 15:49:08 +0000 |
| commit | 41c34d188a598b016d62e152735f8466fe9910a4 (patch) | |
| tree | 90efa948a7901fbfb9450a33373c17efec3f666c /arch/x86_64/bits | |
| parent | on x86_64 use long instead of long long for 64bit posix types (diff) | |
| download | grovel-41c34d188a598b016d62e152735f8466fe9910a4.tar.gz grovel-41c34d188a598b016d62e152735f8466fe9910a4.tar.xz | |
fix ioctl _IOR, _IOW, etc macros to avoid signed overflow (2<<30)
Diffstat (limited to 'arch/x86_64/bits')
| -rw-r--r-- | arch/x86_64/bits/ioctl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86_64/bits/ioctl.h b/arch/x86_64/bits/ioctl.h index 7f3c0380..77a94551 100644 --- a/arch/x86_64/bits/ioctl.h +++ b/arch/x86_64/bits/ioctl.h @@ -4,9 +4,9 @@ #define _IOC_READ 2U #define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) -#define _IOW(a,b,c) _IOC(1,(a),(b),sizeof(c)) -#define _IOR(a,b,c) _IOC(2,(a),(b),sizeof(c)) -#define _IOWR(a,b,c) _IOC(3,(a),(b),sizeof(c)) +#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) +#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) +#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) #define TCGETS 0x5401 #define TCSETS 0x5402 |
