lkml.org 
[lkml]   [2012]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Linux 3.3-rc5
On Tue, Feb 28, 2012 at 11:29 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> 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).

Ahh, yes. That wasn't the only driver that did the "sizeof" by hand,
and as a result got "size_t" when the (nested) *real* sizeof then
happened.

That explains the history behind the garbage.

ioctl numbering have always been pretty painful. Oh, how I wish they
had been ASCII strings rather than random binary blobs. But that's the
way things are (and we certainly screwed up a few /proc files too, so
it's not like using text fixes all potential for screwing up)

Linus
--
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/

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