summaryrefslogtreecommitdiff
path: root/sys/kern/tty_tty.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-10-06 20:23:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-10-06 20:23:17 +0000
commit85674180ac0b414993bec634994ea51b28390306 (patch)
tree5ce384dfed739e368b8605fc6db4ed1f26a43609 /sys/kern/tty_tty.c
parent44f83f3e77b70fbce9f014e39cf5c97bae700213 (diff)
back out vfs lite2 till after 2.2
Diffstat (limited to 'sys/kern/tty_tty.c')
-rw-r--r--sys/kern/tty_tty.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c
index 0f70fcbda85..61360e34849 100644
--- a/sys/kern/tty_tty.c
+++ b/sys/kern/tty_tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_tty.c,v 1.4 1997/10/06 15:12:32 csapuntz Exp $ */
+/* $OpenBSD: tty_tty.c,v 1.5 1997/10/06 20:20:05 deraadt Exp $ */
/* $NetBSD: tty_tty.c,v 1.13 1996/03/30 22:24:46 christos Exp $ */
/*-
@@ -63,7 +63,7 @@ cttyopen(dev, flag, mode, p)
if (ttyvp == NULL)
return (ENXIO);
- vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p);
+ VOP_LOCK(ttyvp);
#ifdef PARANOID
/*
* Since group is tty and mode is 620 on most terminal lines
@@ -78,7 +78,7 @@ cttyopen(dev, flag, mode, p)
if (!error)
#endif /* PARANOID */
error = VOP_OPEN(ttyvp, flag, NOCRED, p);
- VOP_UNLOCK(ttyvp, 0, p);
+ VOP_UNLOCK(ttyvp);
return (error);
}
@@ -89,15 +89,14 @@ cttyread(dev, uio, flag)
struct uio *uio;
int flag;
{
- struct proc *p = uio->uio_procp;
register struct vnode *ttyvp = cttyvp(uio->uio_procp);
int error;
if (ttyvp == NULL)
return (EIO);
- vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p);
+ VOP_LOCK(ttyvp);
error = VOP_READ(ttyvp, uio, flag, NOCRED);
- VOP_UNLOCK(ttyvp, 0, p);
+ VOP_UNLOCK(ttyvp);
return (error);
}
@@ -108,15 +107,14 @@ cttywrite(dev, uio, flag)
struct uio *uio;
int flag;
{
- struct proc *p = uio->uio_procp;
register struct vnode *ttyvp = cttyvp(uio->uio_procp);
int error;
if (ttyvp == NULL)
return (EIO);
- vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p);
+ VOP_LOCK(ttyvp);
error = VOP_WRITE(ttyvp, uio, flag, NOCRED);
- VOP_UNLOCK(ttyvp, 0, p);
+ VOP_UNLOCK(ttyvp);
return (error);
}