Subject: Re: why is my ioctl not being called?
To: Dave McConnell <email@example.com>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 06/08/1999 10:29:29
On Tue, 8 Jun 1999, Dave McConnell wrote:
> > userland code. Clearly, I have missed something.... can anyone give
> > me a hint? BTW yes, I _do_ have the ioctl call in the cdevsw entry, I
> > have verified it is there in cdevsw using ddb.
> Well that would have been my first question :-)
> What "command" are you calling your ioctl with. Are you sure the
> specific command is not being "handled" at a "higher level" (I
> assume this can happen?) and not going through to your ioctl? Try
> defining your own ioctl commands (see sys/filio.h for example of
> defining your own...).
The "upper level" ones are:
FIONBIO, FIOASYNC, FIOSETOWN, and FIOGETOWN. For a FIFO, block, or char
device, everything else should go to a VOP_IOCTL on the vnode (see
vn_ioctl() in vfs_vnops.c). Socket stuff of course goes elsewhere. :-)