diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2019-06-26 13:27:21 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2019-06-26 13:27:21 +0000 |
commit | 6d774ebe2f9e75d0c4637c1732ec18ca0f7d070f (patch) | |
tree | d47a44d9d79bfd031a0876eaf3775600e252fda2 /sys | |
parent | 64f1abda7be19b878edd6854f9a1e75a42ca50bc (diff) |
Return EINVAL, not EBADF for fcntl(fd, F_GETLK) of a non-vnode.
Matches the recent F_SETLK change, POSIX and the man page.
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 c6bf07f1d70..ac144a685ba 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.186 2019/06/25 15:47:28 millert Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.187 2019/06/26 13:27:20 millert Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -592,7 +592,7 @@ restart: break; if (fp->f_type != DTYPE_VNODE) { - error = EBADF; + error = EINVAL; break; } vp = fp->f_data; |