svn commit: r277543 - projects/ifnet/sys/net

Garrett Cooper yaneurabeya at gmail.com
Fri Jan 23 00:18:13 UTC 2015


On Jan 22, 2015, at 16:02, Gleb Smirnoff <glebius at FreeBSD.org> wrote:

> Author: glebius
> Date: Fri Jan 23 00:02:26 2015
> New Revision: 277543
> URL: https://svnweb.freebsd.org/changeset/base/277543
> 
> Log:
>  Return EOPNOTSUPP in case of not supported option.
> 
> Modified:
>  projects/ifnet/sys/net/if_ethersubr.c
> 
> Modified: projects/ifnet/sys/net/if_ethersubr.c
> ==============================================================================
> --- projects/ifnet/sys/net/if_ethersubr.c	Thu Jan 22 23:59:35 2015	(r277542)
> +++ projects/ifnet/sys/net/if_ethersubr.c	Fri Jan 23 00:02:26 2015	(r277543)
> @@ -985,7 +985,7 @@ ether_ioctl(struct ifnet *ifp, u_long co
> 		}
> 		break;
> 	default:
> -		error = EINVAL;			/* XXX netbsd has ENOTTY??? */
> +		error = EOPNOTSUPP;
> 		break;
> 	}
> 	return (error);

Uh, didn’t you just break the ioctl(2) ERRORS guarantee?

     [EBADF]            The fd argument is not a valid descriptor.

     [ENOTTY]           The fd argument is not associated with a character
                        special device.

     [ENOTTY]           The specified request does not apply to the kind of
                        object that the descriptor fd references.

     [EINVAL]           The request or argp argument is not valid.

     [EFAULT]           The argp argument points outside the process's
                        allocated address space.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20150122/7e0921f4/attachment.sig>


More information about the svn-src-projects mailing list