diff options
author | bde <bde@FreeBSD.org> | 1996-12-19 18:16:33 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-12-19 18:16:33 +0000 |
commit | e18fda9e89259585317ee356c6d3cdbbf6da2caa (patch) | |
tree | a0a37786493ed6e18c3d8f317cad8597b32fb397 /sys/fs/fifofs | |
parent | e038bca5512c16a3e256c4767ef430225b0dbcd0 (diff) | |
download | FreeBSD-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/fs/fifofs')
-rw-r--r-- | sys/fs/fifofs/fifo_vnops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index ded0d5f..e3621d2 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); } /* |