diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2019-06-25 15:47:29 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2019-06-25 15:47:29 +0000 |
commit | 817ef6f85711f4debca2399cf04126dac1eb88cb (patch) | |
tree | 6113d464382f286ec695736362f4d2aa78ef61d6 /sys | |
parent | 713d48bb238cf8cfab34e2799eff47c3bcdb7951 (diff) |
Return EINVAL not EBADF when trying to lock a non-vnode.
This behavior matches POSIX and our own fnctl(2) man page.
OK anton@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_descrip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 45fae009691..c6bf07f1d70 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.185 2019/06/21 09:39:48 visa Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.186 2019/06/25 15:47:28 millert Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -518,7 +518,7 @@ restart: break; if (fp->f_type != DTYPE_VNODE) { - error = EBADF; + error = EINVAL; break; } vp = fp->f_data; |