summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-07-25 17:31:39 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-07-25 17:31:39 +0000
commit8195c56a0657b54dfa1ef92b1a704cb2b1d55b13 (patch)
tree3954eefd0ee1af2935562dd59391ae57050476d3
parenteee6b01bc20230891599515a68515aab75336273 (diff)
return EINVAL in case bad locking specified; netbsd
-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 8b76553b80c..735d3b96e77 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.11 1997/01/25 17:37:34 dm Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.12 1997/07/25 17:31:38 mickey Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -871,7 +871,7 @@ sys_flock(p, v, retval)
else if (how & LOCK_SH)
lf.l_type = F_RDLCK;
else
- return (EBADF);
+ return (EINVAL);
fp->f_flag |= FHASLOCK;
if (how & LOCK_NB)
return (VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, F_FLOCK));