In message <[EMAIL PROTECTED]> Yar Tikhiy writes: : First, the current implementation of the utility function : ether_ioctl(), which can do good job common to ethernet drivers, : won't indicate the situation when an ioctl command is unsupported : by it. It will return 0 in this case. Wouldn't it be better to : return EINVAL so the driver can do something about that? : Now each driver using ether_ioctl() has to maintain painfully the : list of the ioctl commands that may be passed to ether_ioctl(), or : the kernel will be likely to panic in copyout() dereferencing a : NULL pointer.
Actaully, it should return ENOTTY rather than EINVAL. ENOTTY means that the ioctl isn't understood. I've had to fix several drivers at work that didn't follow this convention due to ignorance on the part of the driver writer. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message