lkml.org 
[lkml]   [2012]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Linux 3.3-rc5
Date
Linus Torvalds <torvalds@linux-foundation.org> writes:

> I also think that your explanation is wrong. The problem is not the
> use of _IOR() at all, the problem is that the data structure given
> *to* the _IOR() macro is complete grabage. For example:
>
> #define I8K_GET_SPEED _IOWR('i', 0x85, size_t)

Originally the garbage looked like this:

#define I8K_BIOS_VERSION _IOR ('i', 0x80, 4)
#define I8K_MACHINE_ID _IOR ('i', 0x81, 16)
#define I8K_POWER_STATUS _IOR ('i', 0x82, sizeof(int))
#define I8K_FN_STATUS _IOR ('i', 0x83, sizeof(int))
#define I8K_GET_TEMP _IOR ('i', 0x84, sizeof(int))
#define I8K_GET_SPEED _IOWR('i', 0x85, sizeof(int))
#define I8K_GET_FAN _IOWR('i', 0x86, sizeof(int))
#define I8K_SET_FAN _IOWR('i', 0x87, sizeof(int)*2)

Later they were modified by "[PATCH] use size_t for the broken ioctl
numbers" and "Fix more ioctl _IOR/_IOW misusage." (see tglx's history
tree).

Andreas.

--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."


\
 
 \ /
  Last update: 2012-02-28 20:31    [from the cache]
©2003-2011 Jasper Spaans