Thread (5 messages) 5 messages, 2 authors, 2012-10-04

when to return -EOPNOTSUPP in _ioctl in a driver

From: Luis R. Rodriguez <hidden>
Date: 2012-10-02 20:07:05

On Tue, Oct 2, 2012 at 8:26 AM, devendra.aaru [off-list ref] wrote:
Hi all,

While going through some code, i have found a place in which we do return,
-EOPNOTSUPP in an ioctl and the code of ioctl does just this one.


static int drv_ioctl(.. *fops, ...)
{
          return -EOPNOTSUPP;
}


do we actually need to specify a pointer to the ioctl callback, if the
driver doesn't support ioctl?
What type of driver? For networking if you do not have
ops->ndo_do_ioctl then -EOPNOTSUPP is returned. See dev_ifsioc() and
prior to that dev_ioctl() on net/core/dev.c.

  Luis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help