summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/deadfs/dead_vnops.c11
-rw-r--r--sys/fs/specfs/spec_vnops.c13
-rw-r--r--sys/miscfs/deadfs/dead_vnops.c11
-rw-r--r--sys/miscfs/specfs/spec_vnops.c13
4 files changed, 6 insertions, 42 deletions
diff --git a/sys/fs/deadfs/dead_vnops.c b/sys/fs/deadfs/dead_vnops.c
index fb11c2a..6e810f8 100644
--- a/sys/fs/deadfs/dead_vnops.c
+++ b/sys/fs/deadfs/dead_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
- * $Id: dead_vnops.c,v 1.22 1997/12/05 19:55:41 bde Exp $
+ * $Id: dead_vnops.c,v 1.23 1997/12/15 03:09:44 wollman Exp $
*/
#include <sys/param.h>
@@ -144,20 +144,11 @@ dead_read(ap)
if (chkvnlock(ap->a_vp))
panic("dead_read: lock");
-#if 0
- /* Lite2 behaviour */
/*
* Return EOF for tty devices, EIO for others
*/
if ((ap->a_vp->v_flag & VISTTY) == 0)
return (EIO);
-#else
- /*
- * Return EOF for character devices, EIO for others
- */
- if (ap->a_vp->v_type != VCHR)
- return (EIO);
-#endif
return (0);
}
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index 7f05eb2..e94d05f 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95
- * $Id: spec_vnops.c,v 1.66 1998/07/11 07:45:48 bde Exp $
+ * $Id: spec_vnops.c,v 1.67 1998/07/15 02:32:22 bde Exp $
*/
#include <sys/param.h>
@@ -202,17 +202,8 @@ spec_open(ap)
return (EPERM);
}
}
-#if 0
- /*
- * Lite2 stuff. We will almost certainly do this
- * differently with devfs. The only use of this flag
- * is in dead_read to make ttys return EOF instead of
- * EIO when they are dead. Pre-lite2 FreeBSD returns
- * EOF for all character devices.
- */
- if (cdevsw[maj]->d_type == D_TTY)
+ if ((cdevsw[maj]->d_flags & D_TYPEMASK) == D_TTY)
vp->v_flag |= VISTTY;
-#endif
VOP_UNLOCK(vp, 0, p);
error = (*cdevsw[maj]->d_open)(dev, ap->a_mode, S_IFCHR, p);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
diff --git a/sys/miscfs/deadfs/dead_vnops.c b/sys/miscfs/deadfs/dead_vnops.c
index fb11c2a..6e810f8 100644
--- a/sys/miscfs/deadfs/dead_vnops.c
+++ b/sys/miscfs/deadfs/dead_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
- * $Id: dead_vnops.c,v 1.22 1997/12/05 19:55:41 bde Exp $
+ * $Id: dead_vnops.c,v 1.23 1997/12/15 03:09:44 wollman Exp $
*/
#include <sys/param.h>
@@ -144,20 +144,11 @@ dead_read(ap)
if (chkvnlock(ap->a_vp))
panic("dead_read: lock");
-#if 0
- /* Lite2 behaviour */
/*
* Return EOF for tty devices, EIO for others
*/
if ((ap->a_vp->v_flag & VISTTY) == 0)
return (EIO);
-#else
- /*
- * Return EOF for character devices, EIO for others
- */
- if (ap->a_vp->v_type != VCHR)
- return (EIO);
-#endif
return (0);
}
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index 7f05eb2..e94d05f 100644
--- a/sys/miscfs/specfs/spec_vnops.c
+++ b/sys/miscfs/specfs/spec_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95
- * $Id: spec_vnops.c,v 1.66 1998/07/11 07:45:48 bde Exp $
+ * $Id: spec_vnops.c,v 1.67 1998/07/15 02:32:22 bde Exp $
*/
#include <sys/param.h>
@@ -202,17 +202,8 @@ spec_open(ap)
return (EPERM);
}
}
-#if 0
- /*
- * Lite2 stuff. We will almost certainly do this
- * differently with devfs. The only use of this flag
- * is in dead_read to make ttys return EOF instead of
- * EIO when they are dead. Pre-lite2 FreeBSD returns
- * EOF for all character devices.
- */
- if (cdevsw[maj]->d_type == D_TTY)
+ if ((cdevsw[maj]->d_flags & D_TYPEMASK) == D_TTY)
vp->v_flag |= VISTTY;
-#endif
VOP_UNLOCK(vp, 0, p);
error = (*cdevsw[maj]->d_open)(dev, ap->a_mode, S_IFCHR, p);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
OpenPOWER on IntegriCloud