summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/fifofs/fifo_vnops.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-12-19 18:16:33 +0000
committerbde <bde@FreeBSD.org>1996-12-19 18:16:33 +0000
commite18fda9e89259585317ee356c6d3cdbbf6da2caa (patch)
treea0a37786493ed6e18c3d8f317cad8597b32fb397 /sys/miscfs/fifofs/fifo_vnops.c
parente038bca5512c16a3e256c4767ef430225b0dbcd0 (diff)
downloadFreeBSD-src-e18fda9e89259585317ee356c6d3cdbbf6da2caa.zip
FreeBSD-src-e18fda9e89259585317ee356c6d3cdbbf6da2caa.tar.gz
Fixed errno for unsupported advisory locks. The errno is now EINVAL
fcntl() and EOPNOTSUPP for flock(). POSIX specifies the weaker EINVAL errno and the man page agrees. Not fixed: deadfs: always returns wrong EBADF devfs, msdosfs: always return sometimes-wrong EINVAL cd9660, fdesc, kernfs, portal: always return sometimes-wrong EOPNOTSUPP procfs: always returns wrong EIO mfs: panic?! nfs: fudged NetBSD uses a generic file system genfs to do return the sometimes-wrong EOPNOTSUPP more consistently :-)(. Found by: NIST-PCTS
Diffstat (limited to 'sys/miscfs/fifofs/fifo_vnops.c')
-rw-r--r--sys/miscfs/fifofs/fifo_vnops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c
index ded0d5f..e3621d2 100644
--- a/sys/miscfs/fifofs/fifo_vnops.c
+++ b/sys/miscfs/fifofs/fifo_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)fifo_vnops.c 8.2 (Berkeley) 1/4/94
- * $Id: fifo_vnops.c,v 1.16 1996/02/13 18:16:23 wollman Exp $
+ * $Id: fifo_vnops.c,v 1.17 1996/09/03 14:22:23 bde Exp $
*/
#include <sys/param.h>
@@ -531,7 +531,7 @@ fifo_advlock(ap)
} */ *ap;
{
- return (EOPNOTSUPP);
+ return (ap->a_flags & F_FLOCK ? EOPNOTSUPP : EINVAL);
}
/*
OpenPOWER on IntegriCloud