home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] device driver magic number for ioctl() in linux

Hi,

--- On Tue, Nov 4, 2008 at 6:27 AM, Zhao, Joe <jozhao [ at ] ciena [ dot ] com> wrote:
| Can we define the magic number with the value greater than 0xFF? Where
| is this magic number used by linux kernel?
\--

The size of _IOC_TYPEBITS is defined as 8. So, the maximum size is 0xFF.
http://lxr.linux.no/linux+v2.6.27.4/include/asm-generic/ioctl.h#L23

Also read:
http://lxr.linux.no/linux+v2.6.27.4/Documentation/ioctl-number.txt

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com