Re: [PATCH] new ioctl type checking causes gcc warning

From: Kevin P. Fleming
Date: Fri Sep 12 2003 - 19:32:12 EST


Arnd Bergmann wrote:

This doesn't work, because size_t is a typedef, not a macro.

Yeah, I should have thought of that. Sorry.

The type checking this in user space is not necessary, because the point of the check is only to keep people from adding *new*
invalid ioctl numbers and doing the check for the kernel does that.
However, the old numbers need to be kept for a long time and there
is no point in breaking user applications that use established
interfaces.

Hmm, obviously I misunderstood how this worked. 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? 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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/