remove debug code. KNF
authorJan-Simon Pendry <pendry@ucbvax.Berkeley.EDU>
Thu, 6 Jan 1994 04:12:54 +0000 (20:12 -0800)
committerJan-Simon Pendry <pendry@ucbvax.Berkeley.EDU>
Thu, 6 Jan 1994 04:12:54 +0000 (20:12 -0800)
SCCS-vsn: sys/miscfs/portal/portal_vfsops.c 8.5
SCCS-vsn: sys/miscfs/portal/portal_vnops.c 8.6

usr/src/sys/miscfs/portal/portal_vfsops.c
usr/src/sys/miscfs/portal/portal_vnops.c

index 7f7661b..0ae6f17 100644 (file)
@@ -8,7 +8,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)portal_vfsops.c     8.4 (Berkeley) %G%
+ *     @(#)portal_vfsops.c     8.5 (Berkeley) %G%
  *
  * $Id: portal_vfsops.c,v 1.5 1992/05/30 10:25:27 jsp Exp jsp $
  */
  *
  * $Id: portal_vfsops.c,v 1.5 1992/05/30 10:25:27 jsp Exp jsp $
  */
@@ -40,14 +40,13 @@ int
 portal_init()
 {
 
 portal_init()
 {
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_init\n");                /* printed during system boot */
-#endif
+       return (0);
 }
 
 /*
  * Mount the per-process file descriptors (/dev/fd)
  */
 }
 
 /*
  * Mount the per-process file descriptors (/dev/fd)
  */
+int
 portal_mount(mp, path, data, ndp, p)
        struct mount *mp;
        char *path;
 portal_mount(mp, path, data, ndp, p)
        struct mount *mp;
        char *path;
@@ -63,10 +62,6 @@ portal_mount(mp, path, data, ndp, p)
        u_int size;
        int error;
 
        u_int size;
        int error;
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_mount(mp = %x)\n", mp);
-#endif
-
        /*
         * Update is a no-op
         */
        /*
         * Update is a no-op
         */
@@ -95,9 +90,6 @@ portal_mount(mp, path, data, ndp, p)
        VTOPORTAL(rvp)->pt_arg = 0;
        VTOPORTAL(rvp)->pt_size = 0;
        VTOPORTAL(rvp)->pt_fileid = PORTAL_ROOTFILEID;
        VTOPORTAL(rvp)->pt_arg = 0;
        VTOPORTAL(rvp)->pt_size = 0;
        VTOPORTAL(rvp)->pt_fileid = PORTAL_ROOTFILEID;
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_mount: root vp = %x\n", rvp);
-#endif
        fmp->pm_root = rvp;
        fmp->pm_server = fp; fp->f_count++;
 
        fmp->pm_root = rvp;
        fmp->pm_server = fp; fp->f_count++;
 
@@ -116,13 +108,10 @@ portal_mount(mp, path, data, ndp, p)
        bcopy("portal", mp->mnt_stat.f_mntfromname, sizeof("portal"));
 #endif
 
        bcopy("portal", mp->mnt_stat.f_mntfromname, sizeof("portal"));
 #endif
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_mount: config %s at %s\n",
-           mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);
-#endif
        return (0);
 }
 
        return (0);
 }
 
+int
 portal_start(mp, flags, p)
        struct mount *mp;
        int flags;
 portal_start(mp, flags, p)
        struct mount *mp;
        int flags;
@@ -132,6 +121,7 @@ portal_start(mp, flags, p)
        return (0);
 }
 
        return (0);
 }
 
+int
 portal_unmount(mp, mntflags, p)
        struct mount *mp;
        int mntflags;
 portal_unmount(mp, mntflags, p)
        struct mount *mp;
        int mntflags;
@@ -141,9 +131,6 @@ portal_unmount(mp, mntflags, p)
        struct vnode *rootvp = VFSTOPORTAL(mp)->pm_root;
        int error, flags = 0;
 
        struct vnode *rootvp = VFSTOPORTAL(mp)->pm_root;
        int error, flags = 0;
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_unmount(mp = %x)\n", mp);
-#endif
 
        if (mntflags & MNT_FORCE) {
                /* portal can never be rootfs so don't check for it */
 
        if (mntflags & MNT_FORCE) {
                /* portal can never be rootfs so don't check for it */
@@ -158,27 +145,15 @@ portal_unmount(mp, mntflags, p)
         * moment, but who knows...
         */
 #ifdef notyet
         * moment, but who knows...
         */
 #ifdef notyet
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_unmount: calling mntflushbuf\n");
-#endif
        mntflushbuf(mp, 0); 
        mntflushbuf(mp, 0); 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_unmount: calling mntinvalbuf\n");
-#endif
        if (mntinvalbuf(mp, 1))
                return (EBUSY);
 #endif
        if (rootvp->v_usecount > 1)
                return (EBUSY);
        if (mntinvalbuf(mp, 1))
                return (EBUSY);
 #endif
        if (rootvp->v_usecount > 1)
                return (EBUSY);
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_unmount: calling vflush\n");
-#endif
        if (error = vflush(mp, rootvp, flags))
                return (error);
 
        if (error = vflush(mp, rootvp, flags))
                return (error);
 
-#ifdef PORTAL_DIAGNOSTIC
-       vprint("portal root", rootvp);
-#endif  
        /*
         * Release reference on underlying root vnode
         */
        /*
         * Release reference on underlying root vnode
         */
@@ -192,17 +167,11 @@ portal_unmount(mp, mntflags, p)
         * daemon to wake up, and then the accept will get ECONNABORTED
         * which it interprets as a request to go and bury itself.
         */
         * daemon to wake up, and then the accept will get ECONNABORTED
         * which it interprets as a request to go and bury itself.
         */
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_unmount: shutdown socket\n");
-#endif  
        soshutdown((struct socket *) VFSTOPORTAL(mp)->pm_server->f_data, 2);
        /*
         * Discard reference to underlying file.  Must call closef because
         * this may be the last reference.
         */
        soshutdown((struct socket *) VFSTOPORTAL(mp)->pm_server->f_data, 2);
        /*
         * Discard reference to underlying file.  Must call closef because
         * this may be the last reference.
         */
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_unmount: closef(%x)\n", VFSTOPORTAL(mp)->pm_server);
-#endif  
        closef(VFSTOPORTAL(mp)->pm_server, (struct proc *) 0);
        /*
         * Finally, throw away the portalmount structure
        closef(VFSTOPORTAL(mp)->pm_server, (struct proc *) 0);
        /*
         * Finally, throw away the portalmount structure
@@ -212,15 +181,13 @@ portal_unmount(mp, mntflags, p)
        return (0);
 }
 
        return (0);
 }
 
+int
 portal_root(mp, vpp)
        struct mount *mp;
        struct vnode **vpp;
 {
        struct vnode *vp;
 
 portal_root(mp, vpp)
        struct mount *mp;
        struct vnode **vpp;
 {
        struct vnode *vp;
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_root(mp = %x)\n", mp);
-#endif
 
        /*
         * Return locked reference to root.
 
        /*
         * Return locked reference to root.
@@ -232,6 +199,7 @@ portal_root(mp, vpp)
        return (0);
 }
 
        return (0);
 }
 
+int
 portal_quotactl(mp, cmd, uid, arg, p)
        struct mount *mp;
        int cmd;
 portal_quotactl(mp, cmd, uid, arg, p)
        struct mount *mp;
        int cmd;
@@ -243,14 +211,12 @@ portal_quotactl(mp, cmd, uid, arg, p)
        return (EOPNOTSUPP);
 }
 
        return (EOPNOTSUPP);
 }
 
+int
 portal_statfs(mp, sbp, p)
        struct mount *mp;
        struct statfs *sbp;
        struct proc *p;
 {
 portal_statfs(mp, sbp, p)
        struct mount *mp;
        struct statfs *sbp;
        struct proc *p;
 {
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_statfs(mp = %x)\n", mp);
-#endif
 
        sbp->f_type = MOUNT_PORTAL;
        sbp->f_flags = 0;
 
        sbp->f_type = MOUNT_PORTAL;
        sbp->f_flags = 0;
@@ -269,6 +235,7 @@ portal_statfs(mp, sbp, p)
        return (0);
 }
 
        return (0);
 }
 
+int
 portal_sync(mp, waitfor)
        struct mount *mp;
        int waitfor;
 portal_sync(mp, waitfor)
        struct mount *mp;
        int waitfor;
@@ -277,6 +244,7 @@ portal_sync(mp, waitfor)
        return (0);
 }
 
        return (0);
 }
 
+int
 portal_vget(mp, ino, vpp)
        struct mount *mp;
        ino_t ino;
 portal_vget(mp, ino, vpp)
        struct mount *mp;
        ino_t ino;
@@ -286,6 +254,7 @@ portal_vget(mp, ino, vpp)
        return (EOPNOTSUPP);
 }
 
        return (EOPNOTSUPP);
 }
 
+int
 portal_fhtovp(mp, fhp, vpp)
        struct mount *mp;
        struct fid *fhp;
 portal_fhtovp(mp, fhp, vpp)
        struct mount *mp;
        struct fid *fhp;
@@ -295,6 +264,7 @@ portal_fhtovp(mp, fhp, vpp)
        return (EOPNOTSUPP);
 }
 
        return (EOPNOTSUPP);
 }
 
+int
 portal_vptofh(vp, fhp)
        struct vnode *vp;
        struct fid *fhp;
 portal_vptofh(vp, fhp)
        struct vnode *vp;
        struct fid *fhp;
index f7c7213..b35defc 100644 (file)
@@ -8,7 +8,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)portal_vnops.c      8.5 (Berkeley) %G%
+ *     @(#)portal_vnops.c      8.6 (Berkeley) %G%
  *
  * $Id: portal_vnops.c,v 1.4 1992/05/30 10:05:24 jsp Exp jsp $
  */
  *
  * $Id: portal_vnops.c,v 1.4 1992/05/30 10:05:24 jsp Exp jsp $
  */
@@ -64,6 +64,7 @@ portal_closefd(p, fd)
  * vp is the current namei directory
  * cnp is the name to locate in that directory...
  */
  * vp is the current namei directory
  * cnp is the name to locate in that directory...
  */
+int
 portal_lookup(ap)
        struct vop_lookup_args /* {
                struct vnode * a_dvp;
 portal_lookup(ap)
        struct vop_lookup_args /* {
                struct vnode * a_dvp;
@@ -78,9 +79,6 @@ portal_lookup(ap)
        char *path;
        int size;
 
        char *path;
        int size;
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_lookup(%s)\n", pname);
-#endif
        if (ap->a_cnp->cn_namelen == 1 && *pname == '.') {
                *ap->a_vpp = ap->a_dvp;
                VREF(ap->a_dvp);
        if (ap->a_cnp->cn_namelen == 1 && *pname == '.') {
                *ap->a_vpp = ap->a_dvp;
                VREF(ap->a_dvp);
@@ -89,9 +87,6 @@ portal_lookup(ap)
        }
 
 
        }
 
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_lookup: allocate new vnode\n");
-#endif
        error = getnewvnode(VT_PORTAL, ap->a_dvp->v_mount, portal_vnodeop_p, &fvp);
        if (error)
                goto bad;
        error = getnewvnode(VT_PORTAL, ap->a_dvp->v_mount, portal_vnodeop_p, &fvp);
        if (error)
                goto bad;
@@ -116,22 +111,13 @@ portal_lookup(ap)
 
        *ap->a_vpp = fvp;
        /*VOP_LOCK(fvp);*/
 
        *ap->a_vpp = fvp;
        /*VOP_LOCK(fvp);*/
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_lookup: newvp = %x\n", fvp);
-#endif
        return (0);
 
 bad:;
        if (fvp) {
        return (0);
 
 bad:;
        if (fvp) {
-#ifdef PORTAL_DIAGNOSTIC
-               printf("portal_lookup: vrele(%x)\n", fvp);
-#endif
                vrele(fvp);
        }
        *ap->a_vpp = NULL;
                vrele(fvp);
        }
        *ap->a_vpp = NULL;
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_lookup: error = %d\n", error);
-#endif
        return (error);
 }
 
        return (error);
 }
 
@@ -141,15 +127,10 @@ portal_connect(so, so2)
        struct socket *so2;
 {
        /* from unp_connect, bypassing the namei stuff... */
        struct socket *so2;
 {
        /* from unp_connect, bypassing the namei stuff... */
-
        struct socket *so3;
        struct unpcb *unp2;
        struct unpcb *unp3;
 
        struct socket *so3;
        struct unpcb *unp2;
        struct unpcb *unp3;
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_connect\n");
-#endif
-
        if (so2 == 0)
                return (ECONNREFUSED);
 
        if (so2 == 0)
                return (ECONNREFUSED);
 
@@ -159,10 +140,6 @@ portal_connect(so, so2)
        if ((so2->so_options & SO_ACCEPTCONN) == 0)
                return (ECONNREFUSED);
 
        if ((so2->so_options & SO_ACCEPTCONN) == 0)
                return (ECONNREFUSED);
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_connect: calling sonewconn\n");
-#endif
-
        if ((so3 = sonewconn(so2, 0)) == 0)
                return (ECONNREFUSED);
 
        if ((so3 = sonewconn(so2, 0)) == 0)
                return (ECONNREFUSED);
 
@@ -173,13 +150,11 @@ portal_connect(so, so2)
 
        so2 = so3;
 
 
        so2 = so3;
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_connect: calling unp_connect2\n");
-#endif
 
        return (unp_connect2(so, so2));
 }
 
 
        return (unp_connect2(so, so2));
 }
 
+int
 portal_open(ap)
        struct vop_open_args /* {
                struct vnode *a_vp;
 portal_open(ap)
        struct vop_open_args /* {
                struct vnode *a_vp;
@@ -213,10 +188,6 @@ portal_open(ap)
        if (vp->v_flag & VROOT)
                return (0);
 
        if (vp->v_flag & VROOT)
                return (0);
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_open(%x)\n", vp);
-#endif
-
        /*
         * Can't be opened unless the caller is set up
         * to deal with the side effects.  Check for this
        /*
         * Can't be opened unless the caller is set up
         * to deal with the side effects.  Check for this
@@ -238,9 +209,6 @@ portal_open(ap)
        /*
         * Reserve some buffer space
         */
        /*
         * Reserve some buffer space
         */
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_open: calling soreserve\n");
-#endif
        res = pt->pt_size + sizeof(pcred) + 512;        /* XXX */
        error = soreserve(so, res, res);
        if (error)
        res = pt->pt_size + sizeof(pcred) + 512;        /* XXX */
        error = soreserve(so, res, res);
        if (error)
@@ -249,9 +217,6 @@ portal_open(ap)
        /*
         * Kick off connection
         */
        /*
         * Kick off connection
         */
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_open: calling portal_connect\n");
-#endif
        error = portal_connect(so, (struct socket *)fmp->pm_server->f_data);
        if (error)
                goto bad;
        error = portal_connect(so, (struct socket *)fmp->pm_server->f_data);
        if (error)
                goto bad;
@@ -259,9 +224,6 @@ portal_open(ap)
        /*
         * Wait for connection to complete
         */
        /*
         * Wait for connection to complete
         */
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_open: waiting for connect\n");
-#endif
        /*
         * XXX: Since the mount point is holding a reference on the
         * underlying server socket, it is not easy to find out whether
        /*
         * XXX: Since the mount point is holding a reference on the
         * underlying server socket, it is not easy to find out whether
@@ -277,9 +239,6 @@ portal_open(ap)
                if (fmp->pm_server->f_count == 1) {
                        error = ECONNREFUSED;
                        splx(s);
                if (fmp->pm_server->f_count == 1) {
                        error = ECONNREFUSED;
                        splx(s);
-#ifdef PORTAL_DIAGNOSTIC
-                       printf("portal_open: server process has gone away\n");
-#endif
                        goto bad;
                }
                (void) tsleep((caddr_t) &so->so_timeo, PSOCK, "portalcon", 5 * hz);
                        goto bad;
                }
                (void) tsleep((caddr_t) &so->so_timeo, PSOCK, "portalcon", 5 * hz);
@@ -299,9 +258,6 @@ portal_open(ap)
        so->so_rcv.sb_flags |= SB_NOINTR;
        so->so_snd.sb_flags |= SB_NOINTR;
 
        so->so_rcv.sb_flags |= SB_NOINTR;
        so->so_snd.sb_flags |= SB_NOINTR;
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_open: constructing data uio\n");
-#endif
 
        pcred.pcr_flag = ap->a_mode;
        pcred.pcr_uid = ap->a_cred->cr_uid;
 
        pcred.pcr_flag = ap->a_mode;
        pcred.pcr_uid = ap->a_cred->cr_uid;
@@ -319,9 +275,6 @@ portal_open(ap)
        auio.uio_offset = 0;
        auio.uio_resid = aiov[0].iov_len + aiov[1].iov_len;
 
        auio.uio_offset = 0;
        auio.uio_resid = aiov[0].iov_len + aiov[1].iov_len;
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_open: sending data to server\n");
-#endif
        error = sosend(so, (struct mbuf *) 0, &auio,
                        (struct mbuf *) 0, (struct mbuf *) 0, 0);
        if (error)
        error = sosend(so, (struct mbuf *) 0, &auio,
                        (struct mbuf *) 0, (struct mbuf *) 0, 0);
        if (error)
@@ -331,19 +284,8 @@ portal_open(ap)
        do {
                struct mbuf *m = 0;
                int flags = MSG_WAITALL;
        do {
                struct mbuf *m = 0;
                int flags = MSG_WAITALL;
-#ifdef PORTAL_DIAGNOSTIC
-               printf("portal_open: receiving data from server\n");
-               printf("portal_open: so = %x, cm = %x, resid = %d\n",
-                               so, cm, auio.uio_resid);
-               printf("portal_open, uio=%x, mp0=%x, controlp=%x\n", &auio, &cm);
-#endif
                error = soreceive(so, (struct mbuf **) 0, &auio,
                                        &m, &cm, &flags);
                error = soreceive(so, (struct mbuf **) 0, &auio,
                                        &m, &cm, &flags);
-#ifdef PORTAL_DIAGNOSTIC
-               printf("portal_open: after receiving data\n");
-               printf("portal_open: so = %x, cm = %x, resid = %d\n",
-                               so, cm, auio.uio_resid);
-#endif
                if (error)
                        goto bad;
 
                if (error)
                        goto bad;
 
@@ -358,14 +300,8 @@ portal_open(ap)
                        } else {
                                error = EINVAL;
                        }
                        } else {
                                error = EINVAL;
                        }
-#ifdef PORTAL_DIAGNOSTIC
-                       printf("portal_open: error returned is %d\n", error);
-#endif
                } else {
                        if (cm == 0) {
                } else {
                        if (cm == 0) {
-#ifdef PORTAL_DIAGNOSTIC
-                               printf("portal_open: no rights received\n");
-#endif
                                error = ECONNRESET;      /* XXX */
 #ifdef notdef
                                break;
                                error = ECONNRESET;      /* XXX */
 #ifdef notdef
                                break;
@@ -378,9 +314,6 @@ portal_open(ap)
                goto bad;
 
        if (auio.uio_resid) {
                goto bad;
 
        if (auio.uio_resid) {
-#ifdef PORTAL_DIAGNOSTIC
-               printf("portal_open: still need another %d bytes\n", auio.uio_resid);
-#endif
                error = 0;
 #ifdef notdef
                error = EMSGSIZE;
                error = 0;
 #ifdef notdef
                error = EMSGSIZE;
@@ -394,15 +327,9 @@ portal_open(ap)
         * may have been received, or that the rights chain may have more
         * than a single mbuf in it.  What to do?
         */
         * may have been received, or that the rights chain may have more
         * than a single mbuf in it.  What to do?
         */
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_open: about to break apart control message\n");
-#endif
        cmsg = mtod(cm, struct cmsghdr *);
        newfds = (cmsg->cmsg_len - sizeof(*cmsg)) / sizeof (int);
        if (newfds == 0) {
        cmsg = mtod(cm, struct cmsghdr *);
        newfds = (cmsg->cmsg_len - sizeof(*cmsg)) / sizeof (int);
        if (newfds == 0) {
-#ifdef PORTAL_DIAGNOSTIC
-               printf("portal_open: received no fds\n");
-#endif
                error = ECONNREFUSED;
                goto bad;
        }
                error = ECONNREFUSED;
                goto bad;
        }
@@ -430,9 +357,6 @@ portal_open(ap)
         * Check that the mode the file is being opened for is a subset 
         * of the mode of the existing descriptor.
         */
         * Check that the mode the file is being opened for is a subset 
         * of the mode of the existing descriptor.
         */
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_open: checking file flags, fd = %d\n", fd);
-#endif
        fp = p->p_fd->fd_ofiles[fd];
        if (((ap->a_mode & (FREAD|FWRITE)) | fp->f_flag) != fp->f_flag) {
                portal_closefd(p, fd);
        fp = p->p_fd->fd_ofiles[fd];
        if (((ap->a_mode & (FREAD|FWRITE)) | fp->f_flag) != fp->f_flag) {
                portal_closefd(p, fd);
@@ -440,9 +364,6 @@ portal_open(ap)
                goto bad;
        }
 
                goto bad;
        }
 
-#ifdef PORTAL_DIAGNOSTIC
-       printf("portal_open: got fd = %d\n", fd);
-#endif
        /*
         * Save the dup fd in the proc structure then return the
         * special error code (ENXIO) which causes magic things to
        /*
         * Save the dup fd in the proc structure then return the
         * special error code (ENXIO) which causes magic things to
@@ -456,29 +377,17 @@ bad:;
         * And discard the control message.
         */
        if (cm) { 
         * And discard the control message.
         */
        if (cm) { 
-#ifdef PORTAL_DIAGNOSTIC
-               printf("portal_open: free'ing control message\n");
-#endif
                m_freem(cm);
        }
 
        if (so) {
                m_freem(cm);
        }
 
        if (so) {
-#ifdef PORTAL_DIAGNOSTIC
-               printf("portal_open: calling soshutdown\n");
-#endif
                soshutdown(so, 2);
                soshutdown(so, 2);
-#ifdef PORTAL_DIAGNOSTIC
-               printf("portal_open: calling soclose\n");
-#endif
                soclose(so);
        }
                soclose(so);
        }
-#ifdef PORTAL_DIAGNOSTIC
-       if (error != ENODEV)
-               printf("portal_open: error = %d\n", error);
-#endif
        return (error);
 }
 
        return (error);
 }
 
+int
 portal_getattr(ap)
        struct vop_getattr_args /* {
                struct vnode *a_vp;
 portal_getattr(ap)
        struct vop_getattr_args /* {
                struct vnode *a_vp;
@@ -507,9 +416,6 @@ portal_getattr(ap)
        vap->va_bytes = 0;
        /* vap->va_qsize = 0; */
        if (vp->v_flag & VROOT) {
        vap->va_bytes = 0;
        /* vap->va_qsize = 0; */
        if (vp->v_flag & VROOT) {
-#ifdef PORTAL_DIAGNOSTIC
-               printf("portal_getattr: stat rootdir\n");
-#endif
                vap->va_type = VDIR;
                vap->va_mode = S_IRUSR|S_IWUSR|S_IXUSR|
                                S_IRGRP|S_IWGRP|S_IXGRP|
                vap->va_type = VDIR;
                vap->va_mode = S_IRUSR|S_IWUSR|S_IXUSR|
                                S_IRGRP|S_IWGRP|S_IXGRP|
@@ -517,9 +423,6 @@ portal_getattr(ap)
                vap->va_nlink = 2;
                vap->va_fileid = 2;
        } else {
                vap->va_nlink = 2;
                vap->va_fileid = 2;
        } else {
-#ifdef PORTAL_DIAGNOSTIC
-               printf("portal_getattr: stat portal\n");
-#endif
                vap->va_type = VREG;
                vap->va_mode = S_IRUSR|S_IWUSR|
                                S_IRGRP|S_IWGRP|
                vap->va_type = VREG;
                vap->va_mode = S_IRUSR|S_IWUSR|
                                S_IRGRP|S_IWGRP|
@@ -530,6 +433,7 @@ portal_getattr(ap)
        return (0);
 }
 
        return (0);
 }
 
+int
 portal_setattr(ap)
        struct vop_setattr_args /* {
                struct vnode *a_vp;
 portal_setattr(ap)
        struct vop_setattr_args /* {
                struct vnode *a_vp;
@@ -538,6 +442,7 @@ portal_setattr(ap)
                struct proc *a_p;
        } */ *ap;
 {
                struct proc *a_p;
        } */ *ap;
 {
+
        /*
         * Can't mess with the root vnode
         */
        /*
         * Can't mess with the root vnode
         */
@@ -551,6 +456,7 @@ portal_setattr(ap)
  * Fake readdir, just return empty directory.
  * It is hard to deal with '.' and '..' so don't bother.
  */
  * Fake readdir, just return empty directory.
  * It is hard to deal with '.' and '..' so don't bother.
  */
+int
 portal_readdir(ap)
        struct vop_readdir_args /* {
                struct vnode *a_vp;
 portal_readdir(ap)
        struct vop_readdir_args /* {
                struct vnode *a_vp;
@@ -558,40 +464,35 @@ portal_readdir(ap)
                struct ucred *a_cred;
        } */ *ap;
 {
                struct ucred *a_cred;
        } */ *ap;
 {
-       /* *ap->a_eofflagp = 1; */
+
        return (0);
 }
 
        return (0);
 }
 
+int
 portal_inactive(ap)
        struct vop_inactive_args /* {
                struct vnode *a_vp;
        } */ *ap;
 {
 portal_inactive(ap)
        struct vop_inactive_args /* {
                struct vnode *a_vp;
        } */ *ap;
 {
-#ifdef PORTAL_DIAGNOSTIC
-       if (VTOPORTAL(ap->a_vp)->pt_arg)
-               printf("portal_inactive(%x, %s)\n", ap->a_vp, VTOPORTAL(ap->a_vp)->pt_arg);
-       else
-               printf("portal_inactive(%x)\n", ap->a_vp);
-#endif
-       /*vgone(ap->a_vp);*/
+
        return (0);
 }
 
        return (0);
 }
 
+int
 portal_reclaim(ap)
        struct vop_reclaim_args /* {
                struct vnode *a_vp;
        } */ *ap;
 {
        struct portalnode *pt = VTOPORTAL(ap->a_vp);
 portal_reclaim(ap)
        struct vop_reclaim_args /* {
                struct vnode *a_vp;
        } */ *ap;
 {
        struct portalnode *pt = VTOPORTAL(ap->a_vp);
-#ifdef PORTAL_DIAGOISTIC
-       printf("portal_reclaim(%x)\n", ap->a_vp);
-#endif
+
        if (pt->pt_arg) {
                free((caddr_t) pt->pt_arg, M_TEMP);
                pt->pt_arg = 0;
        }
        FREE(ap->a_vp->v_data, M_TEMP);
        ap->a_vp->v_data = 0;
        if (pt->pt_arg) {
                free((caddr_t) pt->pt_arg, M_TEMP);
                pt->pt_arg = 0;
        }
        FREE(ap->a_vp->v_data, M_TEMP);
        ap->a_vp->v_data = 0;
+
        return (0);
 }
 
        return (0);
 }
 
@@ -599,6 +500,7 @@ portal_reclaim(ap)
  * Print out the contents of a Portal vnode.
  */
 /* ARGSUSED */
  * Print out the contents of a Portal vnode.
  */
 /* ARGSUSED */
+int
 portal_print(ap)
        struct vop_print_args /* {
                struct vnode *a_vp;
 portal_print(ap)
        struct vop_print_args /* {
                struct vnode *a_vp;
@@ -610,6 +512,7 @@ portal_print(ap)
 }
 
 /*void*/
 }
 
 /*void*/
+int
 portal_vfree(ap)
        struct vop_vfree_args /* {
                struct vnode *a_pvp;
 portal_vfree(ap)
        struct vop_vfree_args /* {
                struct vnode *a_pvp;
@@ -625,6 +528,7 @@ portal_vfree(ap)
 /*
  * Portal vnode unsupported operation
  */
 /*
  * Portal vnode unsupported operation
  */
+int
 portal_enotsupp()
 {
 
 portal_enotsupp()
 {
 
@@ -634,6 +538,7 @@ portal_enotsupp()
 /*
  * Portal "should never get here" operation
  */
 /*
  * Portal "should never get here" operation
  */
+int
 portal_badop()
 {
 
 portal_badop()
 {
 
@@ -644,6 +549,7 @@ portal_badop()
 /*
  * Portal vnode null operation
  */
 /*
  * Portal vnode null operation
  */
+int
 portal_nullop()
 {
 
 portal_nullop()
 {