aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/fifofs
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1996-12-19 18:16:33 +0000
committerBruce Evans <bde@FreeBSD.org>1996-12-19 18:16:33 +0000
commit2cec12807d3dbba935ef3f0266de062e5fd5eae1 (patch)
treea0a37786493ed6e18c3d8f317cad8597b32fb397 /sys/fs/fifofs
parent323416489d5049c8e7b51ffd6672c9694f65e7fb (diff)
downloadsrc-2cec12807d3dbba935ef3f0266de062e5fd5eae1.tar.gz
src-2cec12807d3dbba935ef3f0266de062e5fd5eae1.zip
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
Notes
Notes: svn path=/head/; revision=20687
Diffstat (limited to 'sys/fs/fifofs')
-rw-r--r--sys/fs/fifofs/fifo_vnops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c
index ded0d5f85361..e3621d2075be 100644
--- a/sys/fs/fifofs/fifo_vnops.c
+++ b/sys/fs/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);
}
/*