delete VERBOSE #ifdef's
[unix-history] / usr / src / sys / kern / tty_tty.c
index 8523b82..954813e 100644 (file)
@@ -1,9 +1,10 @@
-/*
- * Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+/*-
+ * Copyright (c) 1982, 1986, 1991 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
  *
  *
- *     @(#)tty_tty.c   7.12 (Berkeley) %G%
+ *     @(#)tty_tty.c   7.19 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -13,8 +14,8 @@
 #include "systm.h"
 #include "conf.h"
 #include "ioctl.h"
 #include "systm.h"
 #include "conf.h"
 #include "ioctl.h"
-#include "tty.h"
 #include "proc.h"
 #include "proc.h"
+#include "tty.h"
 #include "vnode.h"
 #include "file.h"
 
 #include "vnode.h"
 #include "file.h"
 
@@ -34,19 +35,19 @@ cttyopen(dev, flag, mode, p)
        VOP_LOCK(ttyvp);
        error = VOP_ACCESS(ttyvp,
          (flag&FREAD ? VREAD : 0) | (flag&FWRITE ? VWRITE : 0), p->p_ucred, p);
        VOP_LOCK(ttyvp);
        error = VOP_ACCESS(ttyvp,
          (flag&FREAD ? VREAD : 0) | (flag&FWRITE ? VWRITE : 0), p->p_ucred, p);
+       if (!error)
+               error = VOP_OPEN(ttyvp, flag, NOCRED, p);
        VOP_UNLOCK(ttyvp);
        VOP_UNLOCK(ttyvp);
-       if (error)
-               return (error);
-       return (VOP_OPEN(ttyvp, flag, NOCRED, p));
+       return (error);
 }
 
 /*ARGSUSED*/
 }
 
 /*ARGSUSED*/
-cttyread(dev, uio, flag, p)
+cttyread(dev, uio, flag)
        dev_t dev;
        struct uio *uio;
        dev_t dev;
        struct uio *uio;
-       struct proc *p;
+       int flag;
 {
 {
-       register struct vnode *ttyvp = cttyvp(p);
+       register struct vnode *ttyvp = cttyvp(uio->uio_procp);
        int error;
 
        if (ttyvp == NULL)
        int error;
 
        if (ttyvp == NULL)
@@ -58,12 +59,12 @@ cttyread(dev, uio, flag, p)
 }
 
 /*ARGSUSED*/
 }
 
 /*ARGSUSED*/
-cttywrite(dev, uio, flag, p)
+cttywrite(dev, uio, flag)
        dev_t dev;
        struct uio *uio;
        dev_t dev;
        struct uio *uio;
-       struct proc *p;
+       int flag;
 {
 {
-       register struct vnode *ttyvp = cttyvp(p);
+       register struct vnode *ttyvp = cttyvp(uio->uio_procp);
        int error;
 
        if (ttyvp == NULL)
        int error;
 
        if (ttyvp == NULL)