summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-12-19 19:42:37 +0000
committerbde <bde@FreeBSD.org>1996-12-19 19:42:37 +0000
commitd8370232258e75a57361cafc2243862df35d18f1 (patch)
treecc194e09ac16ca08b2ba8a58498a24e9e4347dfa /sys/fs
parent30805cd75c006c0be5fa92042de94702692aa910 (diff)
downloadFreeBSD-src-d8370232258e75a57361cafc2243862df35d18f1.zip
FreeBSD-src-d8370232258e75a57361cafc2243862df35d18f1.tar.gz
Fixed lseek() on named pipes. It always succeeded but should always fail.
Broke locking on named pipes in the same way as locking on non-vnodes (wrong errno). This will be fixed later. The fix involves negative logic. Named pipes are now distinguished from other types of files with vnodes, and there is additional code to handle vnodes and named pipes in the same way only where that makes sense (not for lseek, locking or TIOCSCTTY).
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/fdescfs/fdesc_vnops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index 0f4ea9b..fc14f70 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -35,7 +35,7 @@
*
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
*
- * $Id: fdesc_vnops.c,v 1.18 1996/09/03 14:22:12 bde Exp $
+ * $Id: fdesc_vnops.c,v 1.19 1996/09/20 05:56:36 nate Exp $
*/
/*
@@ -397,6 +397,7 @@ fdesc_attr(fd, vap, cred, p)
return (EBADF);
switch (fp->f_type) {
+ case DTYPE_FIFO:
case DTYPE_VNODE:
error = VOP_GETATTR((struct vnode *) fp->f_data, vap, cred, p);
if (error == 0 && vap->va_type == VDIR) {
@@ -551,6 +552,7 @@ fdesc_setattr(ap)
* Can setattr the underlying vnode, but not sockets!
*/
switch (fp->f_type) {
+ case DTYPE_FIFO:
case DTYPE_VNODE:
error = VOP_SETATTR((struct vnode *) fp->f_data, ap->a_vap, ap->a_cred, ap->a_p);
break;
OpenPOWER on IntegriCloud