Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCH] new ioctl type checking causes gcc warning | Date | Sat, 13 Sep 2003 13:05:11 +0200 |
| |
On Saturday 13 September 2003 02:31, Kevin P. Fleming wrote: > Does that mean that > these two lines: > > #define BLKGETSIZE64 _IOR(0x12,114,sizeof(__uint64_t)) > #define BLKGETSIZE64 _IOR(0x12,114,__uint64_t) > > actually produce different ioctl numbers?
Exactly. On 32 bit systems, the former is 0x80041272, the latter is 0x80081272. On 64 bit systems, they are both 0x80081272.
> If so, then I don't > understand how the kernel can continue to offer the old/invalid > interface when the new _IOR macro won't accept the first version any > longer.
Inside the kernel, the first definition has to be changed to something like:
#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* broken: actually __u64 */ or #define BLKGETSIZE64 _IOR_BAD(0x12,114,sizeof(__uint64_t)) /* broken */
in order to get a definition that will pass the check and generate the well-known number. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |