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

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

  • Subject: RE: [OCLUG-Tech] device driver magic number for ioctl() in linux
  • From: "Zhao, Joe" <jozhao [ at ] ciena [ dot ] com>
  • Date: Tue, 4 Nov 2008 11:02:27 -0500
 
Thanks, Bart.
That makes sense.

Once again, I really appreciate your time and help.

Joe






-----Original Message-----
From: Bart Trojanowski [mailto:bart-oclug [ at ] jukie [ dot ] net] 
Sent: Tuesday, November 04, 2008 10:57 AM
To: linux [ at ] lists [ dot ] oclug [ dot ] on [ dot ] ca
Cc: Zhao, Joe
Subject: Re: [OCLUG-Tech] device driver magic number for ioctl() in
linux

One more time...

> >     #define _IOC(dir,type,nr,size) \
> >             (((0)    << 22) | \

For some reason I can neither add at 2am or before my 2nd cup of coffee.
16+14 is...

                (((dir) << 30) | \

> >              ((size) << 16) | \
> >              ((type) << 8) | \
> >              ((nr)   << 0))

-Bart

-- 
				WebSig: http://www.jukie.net/~bart/sig/