Subject: Re: Keyboard support for DEC3000
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Chris G. Demetriou <cgd@netbsd1.cygnus.com>
List: port-alpha
Date: 07/24/1998 18:17:44
Jason Thorpe <thorpej@nas.nasa.gov> writes:
> On 24 Jul 1998 18:04:45 -0700
> cgd@netbsd1.cygnus.com (Chris G. Demetriou) wrote:
>
> > "R vs. W don't do what you think they do."
> >
> > In particular, they have _nothing_ to do with checking permissions
> > (you have to do that yourself with the ioctl flags arg, if you think
> > it's appropriate -- in this case, given the way keyboards are used,
> > i'm not sure that it is), but rather with whether data is to be copied
> > into or out of the kernel on ioctl() entry and exit.
> >
> > _IO == no data
> > _IOR == kernel reads the data on entry
> > _IOW == kernel writes the data on exit
> > _IOWR == kernel reads on entry then writes on exit.
>
> not according to ioccom.h
>
> IOC_IN == copy parameters in, and _IOW uses IOC_IN. _IOR uses IOC_OUT.
>
> I think the "read/write" is from the perspective of the requesting process.
*chuckle* "D'OH! Well! Now you know why the code was broken to begin
with..." 8-)
chris