Re: when to return -EOPNOTSUPP in _ioctl in a driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 4, 2012 at 12:29 AM, devendra.aaru <devendra.aaru@xxxxxxxxx> wrote:
> actually i see it in drivers/staging/csr/
>
> this is in netdev.c
>
> here they do the below way
>
> csr_xxx_ioctl(....)
> {
>           int ret;
>
>           ret = -EOPNOTSUPP;
>
>           return ret;
> }
>
> if the ioctl just needs to say that i am not going to support ioctl,
> then why we give the function address in the netdev_ops?

You're right, you should not have to. This is a staging driver though
so the quality is not as good as a sane driver should look like, hence
staging. Send a patch :)

> as i understood from your reply that the dev_ioctl returns -EOPNOTSUPP
> when theres' no ioctl pointer registered in netdev_ops
>
> am i right?

Yup.

  Luis

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux