summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_descrip.c
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/kern/kern_descrip.c
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/kern/kern_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index b7a3d50..9111d46 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
- * $Id: kern_descrip.c,v 1.31 1996/08/15 16:33:32 smpatel Exp $
+ * $Id: kern_descrip.c,v 1.32 1996/09/28 16:33:21 bde Exp $
*/
#include <sys/param.h>
@@ -417,6 +417,7 @@ ofstat(p, uap, retval)
return (EBADF);
switch (fp->f_type) {
+ case DTYPE_FIFO:
case DTYPE_VNODE:
error = vn_stat((struct vnode *)fp->f_data, &ub, p);
break;
@@ -468,6 +469,7 @@ fstat(p, uap, retval)
return (EBADF);
switch (fp->f_type) {
+ case DTYPE_FIFO:
case DTYPE_VNODE:
error = vn_stat((struct vnode *)fp->f_data, &ub, p);
break;
@@ -525,6 +527,7 @@ fpathconf(p, uap, retval)
*retval = PIPE_BUF;
return (0);
+ case DTYPE_FIFO:
case DTYPE_VNODE:
vp = (struct vnode *)fp->f_data;
return (VOP_PATHCONF(vp, uap->name, retval));
OpenPOWER on IntegriCloud