move to rev 7; new include location; misc syntax niggles
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 13 Jul 1992 06:10:50 +0000 (22:10 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 13 Jul 1992 06:10:50 +0000 (22:10 -0800)
SCCS-vsn: sys/miscfs/nullfs/null_subr.c 7.1
SCCS-vsn: sys/miscfs/nullfs/null_vfsops.c 7.1
SCCS-vsn: sys/miscfs/nullfs/null_vnops.c 7.1

usr/src/sys/miscfs/nullfs/null_subr.c
usr/src/sys/miscfs/nullfs/null_vfsops.c
usr/src/sys/miscfs/nullfs/null_vnops.c

index a4a91aa..7e61695 100644 (file)
@@ -8,7 +8,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)lofs_subr.c 1.2 (Berkeley) 6/18/92
+ *     @(#)null_subr.c 7.1 (Berkeley) %G%
  *
  * $Id: lofs_subr.c,v 1.11 1992/05/30 10:05:43 jsp Exp jsp $
  */
  *
  * $Id: lofs_subr.c,v 1.11 1992/05/30 10:05:43 jsp Exp jsp $
  */
@@ -21,7 +21,7 @@
 #include <sys/mount.h>
 #include <sys/namei.h>
 #include <sys/malloc.h>
 #include <sys/mount.h>
 #include <sys/namei.h>
 #include <sys/malloc.h>
-#include <nullfs/null.h>
+#include <miscfs/nullfs/null.h>
 
 #define LOG2_SIZEVNODE 7               /* log2(sizeof struct vnode) */
 #define        NNULLNODECACHE 16
 
 #define LOG2_SIZEVNODE 7               /* log2(sizeof struct vnode) */
 #define        NNULLNODECACHE 16
@@ -257,7 +257,7 @@ null_checkvp(vp, fil, lno)
        int lno;
 {
        struct null_node *a = VTONULL(vp);
        int lno;
 {
        struct null_node *a = VTONULL(vp);
-#if 0
+#ifdef notyet
        /*
         * Can't do this check because vop_reclaim runs
         * with a funny vop vector.
        /*
         * Can't do this check because vop_reclaim runs
         * with a funny vop vector.
@@ -289,7 +289,7 @@ null_checkvp(vp, fil, lno)
                while (null_checkvp_barrier) /*WAIT*/ ;
                panic ("null with unref'ed lowervp");
        };
                while (null_checkvp_barrier) /*WAIT*/ ;
                panic ("null with unref'ed lowervp");
        };
-#if 0
+#ifdef notyet
        printf("null %x/%d -> %x/%d [%s, %d]\n",
                NULLTOV(a), NULLTOV(a)->v_usecount,
                a->null_lowervp, a->null_lowervp->v_usecount,
        printf("null %x/%d -> %x/%d [%s, %d]\n",
                NULLTOV(a), NULLTOV(a)->v_usecount,
                a->null_lowervp, a->null_lowervp->v_usecount,
@@ -298,5 +298,3 @@ null_checkvp(vp, fil, lno)
        return a->null_lowervp;
 }
 #endif
        return a->null_lowervp;
 }
 #endif
-
-
index 7f0f6eb..ca29a89 100644 (file)
@@ -8,7 +8,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)null_vfsops.c       1.6 (Berkeley) %G%
+ *     @(#)null_vfsops.c       7.1 (Berkeley) %G%
  *
  * @(#)lofs_vfsops.c   1.2 (Berkeley) 6/18/92
  * $Id: lofs_vfsops.c,v 1.9 1992/05/30 10:26:24 jsp Exp jsp $
  *
  * @(#)lofs_vfsops.c   1.2 (Berkeley) 6/18/92
  * $Id: lofs_vfsops.c,v 1.9 1992/05/30 10:26:24 jsp Exp jsp $
@@ -27,7 +27,7 @@
 #include <sys/mount.h>
 #include <sys/namei.h>
 #include <sys/malloc.h>
 #include <sys/mount.h>
 #include <sys/namei.h>
 #include <sys/malloc.h>
-#include <nullfs/null.h>
+#include <miscfs/nullfs/null.h>
 
 /*
  * Mount null layer
 
 /*
  * Mount null layer
index 85c4f2b..2d71ef7 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)null_vnops.c        1.7 (Berkeley) %G%
+ *     @(#)null_vnops.c        7.1 (Berkeley) %G%
  *
  * Ancestors:
  *     @(#)lofs_vnops.c        1.2 (Berkeley) 6/18/92
  *
  * Ancestors:
  *     @(#)lofs_vnops.c        1.2 (Berkeley) 6/18/92
@@ -93,7 +93,7 @@
  *
  * For example, imagine mounting a null layer with
  * "mount_null /usr/include /dev/layer/null".
  *
  * For example, imagine mounting a null layer with
  * "mount_null /usr/include /dev/layer/null".
- * Chainging directory to /dev/layer/null will assign
+ * Changing directory to /dev/layer/null will assign
  * the root null-node (which was created when the null layer was mounted).
  * Now consider opening "sys".  A vop_lookup would be
  * done on the root null-node.  This operation would bypass through
  * the root null-node (which was created when the null layer was mounted).
  * Now consider opening "sys".  A vop_lookup would be
  * done on the root null-node.  This operation would bypass through
  * The first approach is to call the aliasing layer's bypass routine.
  * This method is most suitable when you wish to invoke the operation
  * currently being hanldled on the lower layer.  It has the advantage
  * The first approach is to call the aliasing layer's bypass routine.
  * This method is most suitable when you wish to invoke the operation
  * currently being hanldled on the lower layer.  It has the advantage
- * the the bypass routine already must do argument mapping.
+ * that the bypass routine already must do argument mapping.
  * An example of this is null_getattrs in the null layer.
  *
  * A second approach is to directly invoked vnode operations on
  * An example of this is null_getattrs in the null layer.
  *
  * A second approach is to directly invoked vnode operations on
 #include <sys/namei.h>
 #include <sys/malloc.h>
 #include <sys/buf.h>
 #include <sys/namei.h>
 #include <sys/malloc.h>
 #include <sys/buf.h>
-#include <nullfs/null.h>
+#include <miscfs/nullfs/null.h>
 
 
 int null_bug_bypass = 0;   /* for debugging: enables bypass printf'ing */
 
 
 int null_bug_bypass = 0;   /* for debugging: enables bypass printf'ing */
@@ -180,7 +180,10 @@ int null_bug_bypass = 0;   /* for debugging: enables bypass printf'ing */
  */ 
 int
 null_bypass(ap)
  */ 
 int
 null_bypass(ap)
-       struct vop_generic_args *ap;
+       struct vop_generic_args /* {
+               struct vnodeop_desc *a_desc;
+               <other random data follows, presumably>
+       } */ *ap;
 {
        extern int (**null_vnodeop_p)();  /* not extern, really "forward" */
        register struct vnode **this_vp_p;
 {
        extern int (**null_vnodeop_p)();  /* not extern, really "forward" */
        register struct vnode **this_vp_p;
@@ -288,20 +291,27 @@ null_bypass(ap)
  */
 int
 null_getattr(ap)
  */
 int
 null_getattr(ap)
-       struct vop_getattr_args *ap;
+       struct vop_getattr_args /* {
+               struct vnode *a_vp;
+               struct vattr *a_vap;
+               struct ucred *a_cred;
+               struct proc *a_p;
+       } */ *ap;
 {
        int error;
        if (error = null_bypass(ap))
 {
        int error;
        if (error = null_bypass(ap))
-               return error;
+               return (error);
        /* Requires that arguments be restored. */
        ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
        /* Requires that arguments be restored. */
        ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
-       return 0;
+       return (0);
 }
 
 
 int
 }
 
 
 int
-null_inactive (ap)
-       struct vop_inactive_args *ap;
+null_inactive(ap)
+       struct vop_inactive_args /* {
+               struct vnode *a_vp;
+       } */ *ap;
 {
        /*
         * Do nothing (and _don't_ bypass).
 {
        /*
         * Do nothing (and _don't_ bypass).
@@ -315,12 +325,14 @@ null_inactive (ap)
         * like they do in the name lookup cache code.
         * That's too much work for now.
         */
         * like they do in the name lookup cache code.
         * That's too much work for now.
         */
-       return 0;
+       return (0);
 }
 
 int
 }
 
 int
-null_reclaim (ap)
-       struct vop_reclaim_args *ap;
+null_reclaim(ap)
+       struct vop_reclaim_args /* {
+               struct vnode *a_vp;
+       } */ *ap;
 {
        struct vnode *vp = ap->a_vp;
        struct null_node *xp = VTONULL(vp);
 {
        struct vnode *vp = ap->a_vp;
        struct null_node *xp = VTONULL(vp);
@@ -336,17 +348,19 @@ null_reclaim (ap)
        FREE(vp->v_data, M_TEMP);
        vp->v_data = NULL;
        vrele (lowervp);
        FREE(vp->v_data, M_TEMP);
        vp->v_data = NULL;
        vrele (lowervp);
-       return 0;
+       return (0);
 }
 
 
 int
 }
 
 
 int
-null_print (ap)
-       struct vop_print_args *ap;
+null_print(ap)
+       struct vop_print_args /* {
+               struct vnode *a_vp;
+       } */ *ap;
 {
        register struct vnode *vp = ap->a_vp;
        printf ("\ttag VT_NULLFS, vp=%x, lowervp=%x\n", vp, NULLVPTOLOWERVP(vp));
 {
        register struct vnode *vp = ap->a_vp;
        printf ("\ttag VT_NULLFS, vp=%x, lowervp=%x\n", vp, NULLVPTOLOWERVP(vp));
-       return 0;
+       return (0);
 }
 
 
 }
 
 
@@ -356,8 +370,10 @@ null_print (ap)
  * This goes away with a merged VM/buffer cache.
  */
 int
  * This goes away with a merged VM/buffer cache.
  */
 int
-null_strategy (ap)
-       struct vop_strategy_args *ap;
+null_strategy(ap)
+       struct vop_strategy_args /* {
+               struct buf *a_bp;
+       } */ *ap;
 {
        struct buf *bp = ap->a_bp;
        int error;
 {
        struct buf *bp = ap->a_bp;
        int error;
@@ -370,7 +386,7 @@ null_strategy (ap)
 
        bp->b_vp = savedvp;
 
 
        bp->b_vp = savedvp;
 
-       return error;
+       return (error);
 }
 
 
 }
 
 
@@ -380,8 +396,10 @@ null_strategy (ap)
  * This goes away with a merged VM/buffer cache.
  */
 int
  * This goes away with a merged VM/buffer cache.
  */
 int
-null_bwrite (ap)
-       struct vop_bwrite_args *ap;
+null_bwrite(ap)
+       struct vop_bwrite_args /* {
+               struct buf *a_bp;
+       } */ *ap;
 {
        struct buf *bp = ap->a_bp;
        int error;
 {
        struct buf *bp = ap->a_bp;
        int error;
@@ -394,10 +412,9 @@ null_bwrite (ap)
 
        bp->b_vp = savedvp;
 
 
        bp->b_vp = savedvp;
 
-       return error;
+       return (error);
 }
 
 }
 
-
 /*
  * Global vfs data structures
  */
 /*
  * Global vfs data structures
  */