summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2019-06-26 13:27:20 +0000
committermillert <millert@openbsd.org>2019-06-26 13:27:20 +0000
commitda8eb40410e377e59f6590d5294c3b93e1cfcd05 (patch)
tree02330a7edcb71b0ad1be9edd52625bb8b1f6b571
parentLog window and pane resizes. (diff)
downloadwireguard-openbsd-da8eb40410e377e59f6590d5294c3b93e1cfcd05.tar.xz
wireguard-openbsd-da8eb40410e377e59f6590d5294c3b93e1cfcd05.zip
Return EINVAL, not EBADF for fcntl(fd, F_GETLK) of a non-vnode.
Matches the recent F_SETLK change, POSIX and the man page.
-rw-r--r--sys/kern/kern_descrip.c4
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;