diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1994-05-25 09:21:21 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1994-05-25 09:21:21 +0000 |
commit | 2469c867a164210ce96143517059f21db7f1fd17 (patch) | |
tree | 9179427ac860211c445df663fd2b86267366bfba /sys/miscfs | |
parent | cb0aba89af15a48e2655e898a503946ac4cb42ae (diff) | |
download | FreeBSD-src-2469c867a164210ce96143517059f21db7f1fd17.zip FreeBSD-src-2469c867a164210ce96143517059f21db7f1fd17.tar.gz |
The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.
Reviewed by: Rodney W. Grimes
Submitted by: John Dyson and David Greenman
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/deadfs/dead_vnops.c | 14 | ||||
-rw-r--r-- | sys/miscfs/fdesc/fdesc_vnops.c | 5 | ||||
-rw-r--r-- | sys/miscfs/fifofs/fifo_vnops.c | 18 | ||||
-rw-r--r-- | sys/miscfs/kernfs/kernfs_vfsops.c | 12 | ||||
-rw-r--r-- | sys/miscfs/kernfs/kernfs_vnops.c | 13 | ||||
-rw-r--r-- | sys/miscfs/nullfs/null_subr.c | 2 | ||||
-rw-r--r-- | sys/miscfs/portal/portal_vnops.c | 1 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vfsops.c | 11 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 16 | ||||
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 16 | ||||
-rw-r--r-- | sys/miscfs/umapfs/umap_subr.c | 2 | ||||
-rw-r--r-- | sys/miscfs/umapfs/umap_vnops.c | 2 | ||||
-rw-r--r-- | sys/miscfs/union/union_subr.c | 7 | ||||
-rw-r--r-- | sys/miscfs/union/union_vfsops.c | 2 | ||||
-rw-r--r-- | sys/miscfs/union/union_vnops.c | 2 |
15 files changed, 115 insertions, 8 deletions
diff --git a/sys/miscfs/deadfs/dead_vnops.c b/sys/miscfs/deadfs/dead_vnops.c index 9d04652..cac8775 100644 --- a/sys/miscfs/deadfs/dead_vnops.c +++ b/sys/miscfs/deadfs/dead_vnops.c @@ -156,6 +156,7 @@ dead_lookup(ap) * Open always fails as if device did not exist. */ /* ARGSUSED */ +int dead_open(ap) struct vop_open_args /* { struct vnode *a_vp; @@ -172,6 +173,7 @@ dead_open(ap) * Vnode op for read */ /* ARGSUSED */ +int dead_read(ap) struct vop_read_args /* { struct vnode *a_vp; @@ -195,6 +197,7 @@ dead_read(ap) * Vnode op for write */ /* ARGSUSED */ +int dead_write(ap) struct vop_write_args /* { struct vnode *a_vp; @@ -213,6 +216,7 @@ dead_write(ap) * Device ioctl operation. */ /* ARGSUSED */ +int dead_ioctl(ap) struct vop_ioctl_args /* { struct vnode *a_vp; @@ -230,6 +234,7 @@ dead_ioctl(ap) } /* ARGSUSED */ +int dead_select(ap) struct vop_select_args /* { struct vnode *a_vp; @@ -249,6 +254,7 @@ dead_select(ap) /* * Just call the device strategy routine */ +int dead_strategy(ap) struct vop_strategy_args /* { struct buf *a_bp; @@ -266,6 +272,7 @@ dead_strategy(ap) /* * Wait until the vnode has finished changing state. */ +int dead_lock(ap) struct vop_lock_args /* { struct vnode *a_vp; @@ -280,6 +287,7 @@ dead_lock(ap) /* * Wait until the vnode has finished changing state. */ +int dead_bmap(ap) struct vop_bmap_args /* { struct vnode *a_vp; @@ -299,6 +307,7 @@ dead_bmap(ap) * Print out the contents of a dead vnode. */ /* ARGSUSED */ +int dead_print(ap) struct vop_print_args /* { struct vnode *a_vp; @@ -306,11 +315,13 @@ dead_print(ap) { printf("tag VT_NON, dead vnode\n"); + return (0); } /* * Empty vnode failed operation */ +int dead_ebadf() { @@ -320,6 +331,7 @@ dead_ebadf() /* * Empty vnode bad operation */ +int dead_badop() { @@ -330,6 +342,7 @@ dead_badop() /* * Empty vnode null operation */ +int dead_nullop() { @@ -340,6 +353,7 @@ dead_nullop() * We have to wait during times when the vnode is * in a state of change. */ +int chkvnlock(vp) register struct vnode *vp; { diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index 00d8675..83e6657 100644 --- a/sys/miscfs/fdesc/fdesc_vnops.c +++ b/sys/miscfs/fdesc/fdesc_vnops.c @@ -88,6 +88,7 @@ static struct fdcache fdcache[NFDCACHE]; /* * Initialise cache headers */ +int fdesc_init() { struct fdcache *fc; @@ -96,6 +97,7 @@ fdesc_init() for (fc = fdcache; fc < fdcache + NFDCACHE; fc++) fc->fc_forw = fc->fc_back = (struct fdescnode *) fc; + return (0); } /* @@ -183,7 +185,7 @@ fdesc_lookup(ap) char *pname; struct proc *p; int nfiles; - unsigned fd; + unsigned fd = 0; int error; struct vnode *fvp; char *ln; @@ -800,6 +802,7 @@ fdesc_reclaim(ap) /* * Return POSIX pathconf information applicable to special devices. */ +int fdesc_pathconf(ap) struct vop_pathconf_args /* { struct vnode *a_vp; diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index bad33a4..a1ba3f4 100644 --- a/sys/miscfs/fifofs/fifo_vnops.c +++ b/sys/miscfs/fifofs/fifo_vnops.c @@ -111,6 +111,7 @@ struct vnodeopv_desc fifo_vnodeop_opv_desc = * Trivial lookup routine that always fails. */ /* ARGSUSED */ +int fifo_lookup(ap) struct vop_lookup_args /* { struct vnode * a_dvp; @@ -128,6 +129,7 @@ fifo_lookup(ap) * to find an active instance of a fifo. */ /* ARGSUSED */ +int fifo_open(ap) struct vop_open_args /* { struct vnode *a_vp; @@ -218,6 +220,7 @@ fifo_open(ap) * Vnode op for read */ /* ARGSUSED */ +int fifo_read(ap) struct vop_read_args /* { struct vnode *a_vp; @@ -257,6 +260,7 @@ fifo_read(ap) * Vnode op for write */ /* ARGSUSED */ +int fifo_write(ap) struct vop_write_args /* { struct vnode *a_vp; @@ -286,6 +290,7 @@ fifo_write(ap) * Device ioctl operation. */ /* ARGSUSED */ +int fifo_ioctl(ap) struct vop_ioctl_args /* { struct vnode *a_vp; @@ -308,6 +313,7 @@ fifo_ioctl(ap) } /* ARGSUSED */ +int fifo_select(ap) struct vop_select_args /* { struct vnode *a_vp; @@ -329,6 +335,7 @@ fifo_select(ap) /* * This is a noop, simply returning what one has been given. */ +int fifo_bmap(ap) struct vop_bmap_args /* { struct vnode *a_vp; @@ -349,6 +356,7 @@ fifo_bmap(ap) * At the moment we do not do any locking. */ /* ARGSUSED */ +int fifo_lock(ap) struct vop_lock_args /* { struct vnode *a_vp; @@ -359,6 +367,7 @@ fifo_lock(ap) } /* ARGSUSED */ +int fifo_unlock(ap) struct vop_unlock_args /* { struct vnode *a_vp; @@ -372,6 +381,7 @@ fifo_unlock(ap) * Device close routine */ /* ARGSUSED */ +int fifo_close(ap) struct vop_close_args /* { struct vnode *a_vp; @@ -407,6 +417,7 @@ fifo_close(ap) /* * Print out the contents of a fifo vnode. */ +int fifo_print(ap) struct vop_print_args /* { struct vnode *a_vp; @@ -416,11 +427,13 @@ fifo_print(ap) printf("tag VT_NON"); fifo_printinfo(ap->a_vp); printf("\n"); + return (0); } /* * Print out internal contents of a fifo vnode. */ +int fifo_printinfo(vp) struct vnode *vp; { @@ -428,11 +441,13 @@ fifo_printinfo(vp) printf(", fifo with %d readers and %d writers", fip->fi_readers, fip->fi_writers); + return (0); } /* * Return POSIX pathconf information applicable to fifo's. */ +int fifo_pathconf(ap) struct vop_pathconf_args /* { struct vnode *a_vp; @@ -460,6 +475,7 @@ fifo_pathconf(ap) /* * Fifo failed operation */ +int fifo_ebadf() { @@ -470,6 +486,7 @@ fifo_ebadf() * Fifo advisory byte-level locks. */ /* ARGSUSED */ +int fifo_advlock(ap) struct vop_advlock_args /* { struct vnode *a_vp; @@ -486,6 +503,7 @@ fifo_advlock(ap) /* * Fifo bad operation */ +int fifo_badop() { diff --git a/sys/miscfs/kernfs/kernfs_vfsops.c b/sys/miscfs/kernfs/kernfs_vfsops.c index b68d76e..a3fa803 100644 --- a/sys/miscfs/kernfs/kernfs_vfsops.c +++ b/sys/miscfs/kernfs/kernfs_vfsops.c @@ -84,6 +84,7 @@ cdevvp(dev, vpp) return (0); } +int kernfs_init() { int cmaj; @@ -107,11 +108,13 @@ kernfs_init() printf("kernfs: no raw boot device\n"); rrootvp = 0; } + return (0); } /* * Mount the Kernel params filesystem */ +int kernfs_mount(mp, path, data, ndp, p) struct mount *mp; char *path; @@ -160,6 +163,7 @@ kernfs_mount(mp, path, data, ndp, p) return (0); } +int kernfs_start(mp, flags, p) struct mount *mp; int flags; @@ -168,6 +172,7 @@ kernfs_start(mp, flags, p) return (0); } +int kernfs_unmount(mp, mntflags, p) struct mount *mp; int mntflags; @@ -221,6 +226,7 @@ kernfs_unmount(mp, mntflags, p) return 0; } +int kernfs_root(mp, vpp) struct mount *mp; struct vnode **vpp; @@ -241,6 +247,7 @@ kernfs_root(mp, vpp) return (0); } +int kernfs_quotactl(mp, cmd, uid, arg, p) struct mount *mp; int cmd; @@ -251,6 +258,7 @@ kernfs_quotactl(mp, cmd, uid, arg, p) return (EOPNOTSUPP); } +int kernfs_statfs(mp, sbp, p) struct mount *mp; struct statfs *sbp; @@ -277,6 +285,7 @@ kernfs_statfs(mp, sbp, p) return (0); } +int kernfs_sync(mp, waitfor) struct mount *mp; int waitfor; @@ -288,6 +297,7 @@ kernfs_sync(mp, waitfor) * Kernfs flat namespace lookup. * Currently unsupported. */ +int kernfs_vget(mp, ino, vpp) struct mount *mp; ino_t ino; @@ -298,6 +308,7 @@ kernfs_vget(mp, ino, vpp) } +int kernfs_fhtovp(mp, fhp, setgen, vpp) struct mount *mp; struct fid *fhp; @@ -307,6 +318,7 @@ kernfs_fhtovp(mp, fhp, setgen, vpp) return (EOPNOTSUPP); } +int kernfs_vptofh(vp, fhp) struct vnode *vp; struct fid *fhp; diff --git a/sys/miscfs/kernfs/kernfs_vnops.c b/sys/miscfs/kernfs/kernfs_vnops.c index 10b7d7c..db7377d 100644 --- a/sys/miscfs/kernfs/kernfs_vnops.c +++ b/sys/miscfs/kernfs/kernfs_vnops.c @@ -186,6 +186,7 @@ kernfs_xwrite(kt, buf, len) * vp is the current namei directory * ndp is the name to locate in that directory... */ +int kernfs_lookup(ap) struct vop_lookup_args /* { struct vnode * a_dvp; @@ -289,6 +290,7 @@ bad:; return (error); } +int kernfs_open(ap) struct vop_open_args /* { struct vnode *a_vp; @@ -352,6 +354,7 @@ kernfs_access(ap) } +int kernfs_getattr(ap) struct vop_getattr_args /* { struct vnode *a_vp; @@ -411,6 +414,7 @@ kernfs_getattr(ap) return (error); } +int kernfs_setattr(ap) struct vop_setattr_args /* { struct vnode *a_vp; @@ -501,6 +505,7 @@ kernfs_write(ap) } +int kernfs_readdir(ap) struct vop_readdir_args /* { struct vnode *a_vp; @@ -551,6 +556,7 @@ kernfs_readdir(ap) return (error); } +int kernfs_inactive(ap) struct vop_inactive_args /* { struct vnode *a_vp; @@ -569,6 +575,7 @@ kernfs_inactive(ap) return (0); } +int kernfs_reclaim(ap) struct vop_reclaim_args /* { struct vnode *a_vp; @@ -588,6 +595,7 @@ kernfs_reclaim(ap) /* * Return POSIX pathconf information applicable to special devices. */ +int kernfs_pathconf(ap) struct vop_pathconf_args /* { struct vnode *a_vp; @@ -625,6 +633,7 @@ kernfs_pathconf(ap) * Print out the contents of a /dev/fd vnode. */ /* ARGSUSED */ +int kernfs_print(ap) struct vop_print_args /* { struct vnode *a_vp; @@ -636,6 +645,7 @@ kernfs_print(ap) } /*void*/ +int kernfs_vfree(ap) struct vop_vfree_args /* { struct vnode *a_pvp; @@ -650,6 +660,7 @@ kernfs_vfree(ap) /* * /dev/fd vnode unsupported operation */ +int kernfs_enotsupp() { @@ -659,6 +670,7 @@ kernfs_enotsupp() /* * /dev/fd "should never get here" operation */ +int kernfs_badop() { @@ -669,6 +681,7 @@ kernfs_badop() /* * kernfs vnode null operation */ +int kernfs_nullop() { diff --git a/sys/miscfs/nullfs/null_subr.c b/sys/miscfs/nullfs/null_subr.c index a31723f..5541fb3 100644 --- a/sys/miscfs/nullfs/null_subr.c +++ b/sys/miscfs/nullfs/null_subr.c @@ -73,6 +73,7 @@ static struct null_node_cache null_node_cache[NNULLNODECACHE]; /* * Initialise cache headers */ +int nullfs_init() { struct null_node_cache *ac; @@ -82,6 +83,7 @@ nullfs_init() for (ac = null_node_cache; ac < null_node_cache + NNULLNODECACHE; ac++) ac->ac_forw = ac->ac_back = (struct null_node *) ac; + return (0); } /* diff --git a/sys/miscfs/portal/portal_vnops.c b/sys/miscfs/portal/portal_vnops.c index 5e17026..c19e815 100644 --- a/sys/miscfs/portal/portal_vnops.c +++ b/sys/miscfs/portal/portal_vnops.c @@ -524,6 +524,7 @@ portal_reclaim(ap) /* * Return POSIX pathconf information applicable to special devices. */ +int portal_pathconf(ap) struct vop_pathconf_args /* { struct vnode *a_vp; diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c index 3938ca1..67dc31f 100644 --- a/sys/miscfs/procfs/procfs_vfsops.c +++ b/sys/miscfs/procfs/procfs_vfsops.c @@ -62,6 +62,7 @@ * mount system call */ /* ARGSUSED */ +int procfs_mount(mp, path, data, ndp, p) struct mount *mp; char *path; @@ -96,6 +97,7 @@ procfs_mount(mp, path, data, ndp, p) /* * unmount system call */ +int procfs_unmount(mp, mntflags, p) struct mount *mp; int mntflags; @@ -118,6 +120,7 @@ procfs_unmount(mp, mntflags, p) return (0); } +int procfs_root(mp, vpp) struct mount *mp; struct vnode **vpp; @@ -141,6 +144,7 @@ procfs_root(mp, vpp) /* */ /* ARGSUSED */ +int procfs_start(mp, flags, p) struct mount *mp; int flags; @@ -153,6 +157,7 @@ procfs_start(mp, flags, p) /* * Get file system statistics. */ +int procfs_statfs(mp, sbp, p) struct mount *mp; struct statfs *sbp; @@ -177,6 +182,7 @@ procfs_statfs(mp, sbp, p) } +int procfs_quotactl(mp, cmds, uid, arg, p) struct mount *mp; int cmds; @@ -188,6 +194,7 @@ procfs_quotactl(mp, cmds, uid, arg, p) return (EOPNOTSUPP); } +int procfs_sync(mp, waitfor) struct mount *mp; int waitfor; @@ -196,6 +203,7 @@ procfs_sync(mp, waitfor) return (0); } +int procfs_vget(mp, ino, vpp) struct mount *mp; ino_t ino; @@ -205,6 +213,7 @@ procfs_vget(mp, ino, vpp) return (EOPNOTSUPP); } +int procfs_fhtovp(mp, fhp, vpp) struct mount *mp; struct fid *fhp; @@ -214,6 +223,7 @@ procfs_fhtovp(mp, fhp, vpp) return (EINVAL); } +int procfs_vptofh(vp, fhp) struct vnode *vp; struct fid *fhp; @@ -222,6 +232,7 @@ procfs_vptofh(vp, fhp) return EINVAL; } +int procfs_init() { diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index 4e1ee00..b6c6e6f 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -100,6 +100,7 @@ static pid_t atopid __P((const char *, u_int)); * is to support exclusive open on process * memory images. */ +int procfs_open(ap) struct vop_open_args *ap; { @@ -134,6 +135,7 @@ procfs_open(ap) * nothing to do for procfs other than undo * any exclusive open flag (see _open above). */ +int procfs_close(ap) struct vop_close_args *ap; { @@ -153,6 +155,7 @@ procfs_close(ap) * do an ioctl operation on pfsnode (vp). * (vp) is not locked on entry or exit. */ +int procfs_ioctl(ap) struct vop_ioctl_args *ap; { @@ -170,6 +173,7 @@ procfs_ioctl(ap) * usual no-op bmap, although returning * (EIO) would be a reasonable alternative. */ +int procfs_bmap(ap) struct vop_bmap_args *ap; { @@ -197,6 +201,7 @@ procfs_bmap(ap) * * (vp) is not locked on entry or exit. */ +int procfs_inactive(ap) struct vop_inactive_args *ap; { @@ -215,6 +220,7 @@ procfs_inactive(ap) * to free any private data and remove the node * from any private lists. */ +int procfs_reclaim(ap) struct vop_reclaim_args *ap; { @@ -227,6 +233,7 @@ procfs_reclaim(ap) /* * Return POSIX pathconf information applicable to special devices. */ +int procfs_pathconf(ap) struct vop_pathconf_args /* { struct vnode *a_vp; @@ -265,6 +272,7 @@ procfs_pathconf(ap) * just print a readable description * of (vp). */ +int procfs_print(ap) struct vop_print_args *ap; { @@ -273,6 +281,7 @@ procfs_print(ap) printf("tag VT_PROCFS, pid %d, mode %x, flags %x\n", pfs->pfs_pid, pfs->pfs_mode, pfs->pfs_flags); + return (0); } /* @@ -281,6 +290,7 @@ procfs_print(ap) * for undoing any side-effects caused by the lookup. * this will always include freeing the pathname buffer. */ +int procfs_abortop(ap) struct vop_abortop_args *ap; { @@ -293,6 +303,7 @@ procfs_abortop(ap) /* * generic entry point for unsupported operations */ +int procfs_badop() { @@ -308,6 +319,7 @@ procfs_badop() * * this is relatively minimal for procfs. */ +int procfs_getattr(ap) struct vop_getattr_args *ap; { @@ -423,6 +435,7 @@ procfs_getattr(ap) return (error); } +int procfs_setattr(ap) struct vop_setattr_args *ap; { @@ -451,6 +464,7 @@ procfs_setattr(ap) * but does mean that the i/o entry points need to check * that the operation really does make sense. */ +int procfs_access(ap) struct vop_access_args *ap; { @@ -502,6 +516,7 @@ found: * filesystem doesn't do any locking of its own. otherwise * read and inwardly digest ufs_lookup(). */ +int procfs_lookup(ap) struct vop_lookup_args *ap; { @@ -612,6 +627,7 @@ procfs_lookup(ap) * * this should just be done through read() */ +int procfs_readdir(ap) struct vop_readdir_args *ap; { diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 111c517..55b5dd8 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -126,6 +126,7 @@ spec_lookup(ap) * Open a special file. */ /* ARGSUSED */ +int spec_open(ap) struct vop_open_args /* { struct vnode *a_vp; @@ -203,6 +204,7 @@ spec_open(ap) * Vnode op for read */ /* ARGSUSED */ +int spec_read(ap) struct vop_read_args /* { struct vnode *a_vp; @@ -285,6 +287,7 @@ spec_read(ap) * Vnode op for write */ /* ARGSUSED */ +int spec_write(ap) struct vop_write_args /* { struct vnode *a_vp; @@ -365,6 +368,7 @@ spec_write(ap) * Device ioctl operation. */ /* ARGSUSED */ +int spec_ioctl(ap) struct vop_ioctl_args /* { struct vnode *a_vp; @@ -399,6 +403,7 @@ spec_ioctl(ap) } /* ARGSUSED */ +int spec_select(ap) struct vop_select_args /* { struct vnode *a_vp; @@ -476,6 +481,7 @@ loop: /* * Just call the device strategy routine */ +int spec_strategy(ap) struct vop_strategy_args /* { struct buf *a_bp; @@ -489,6 +495,7 @@ spec_strategy(ap) /* * This is a noop, simply returning what one has been given. */ +int spec_bmap(ap) struct vop_bmap_args /* { struct vnode *a_vp; @@ -509,6 +516,7 @@ spec_bmap(ap) * At the moment we do not do any locking. */ /* ARGSUSED */ +int spec_lock(ap) struct vop_lock_args /* { struct vnode *a_vp; @@ -519,6 +527,7 @@ spec_lock(ap) } /* ARGSUSED */ +int spec_unlock(ap) struct vop_unlock_args /* { struct vnode *a_vp; @@ -532,6 +541,7 @@ spec_unlock(ap) * Device close routine */ /* ARGSUSED */ +int spec_close(ap) struct vop_close_args /* { struct vnode *a_vp; @@ -606,6 +616,7 @@ spec_close(ap) /* * Print out the contents of a special device vnode. */ +int spec_print(ap) struct vop_print_args /* { struct vnode *a_vp; @@ -614,11 +625,13 @@ spec_print(ap) printf("tag VT_NON, dev %d, %d\n", major(ap->a_vp->v_rdev), minor(ap->a_vp->v_rdev)); + return (0); } /* * Return POSIX pathconf information applicable to special devices. */ +int spec_pathconf(ap) struct vop_pathconf_args /* { struct vnode *a_vp; @@ -656,6 +669,7 @@ spec_pathconf(ap) * Special device advisory byte-level locks. */ /* ARGSUSED */ +int spec_advlock(ap) struct vop_advlock_args /* { struct vnode *a_vp; @@ -672,6 +686,7 @@ spec_advlock(ap) /* * Special device failed operation */ +int spec_ebadf() { @@ -681,6 +696,7 @@ spec_ebadf() /* * Special device bad operation */ +int spec_badop() { diff --git a/sys/miscfs/umapfs/umap_subr.c b/sys/miscfs/umapfs/umap_subr.c index 6f1f077..b640891 100644 --- a/sys/miscfs/umapfs/umap_subr.c +++ b/sys/miscfs/umapfs/umap_subr.c @@ -73,6 +73,7 @@ static struct umap_node_cache umap_node_cache[NUMAPNODECACHE]; /* * Initialise cache headers */ +int umapfs_init() { struct umap_node_cache *ac; @@ -82,6 +83,7 @@ umapfs_init() for (ac = umap_node_cache; ac < umap_node_cache + NUMAPNODECACHE; ac++) ac->ac_forw = ac->ac_back = (struct umap_node *) ac; + return (0); } /* diff --git a/sys/miscfs/umapfs/umap_vnops.c b/sys/miscfs/umapfs/umap_vnops.c index 287804e..0c1955f 100644 --- a/sys/miscfs/umapfs/umap_vnops.c +++ b/sys/miscfs/umapfs/umap_vnops.c @@ -67,7 +67,7 @@ umap_bypass(ap) { extern int (**umap_vnodeop_p)(); /* not extern, really "forward" */ struct ucred **credpp = 0, *credp = 0; - struct ucred *savecredp, *savecompcredp = 0; + struct ucred *savecredp = 0, *savecompcredp = 0; struct ucred *compcredp = 0; struct vnode **this_vp_p; int error; diff --git a/sys/miscfs/union/union_subr.c b/sys/miscfs/union/union_subr.c index 77947d1..ea4f804 100644 --- a/sys/miscfs/union/union_subr.c +++ b/sys/miscfs/union/union_subr.c @@ -49,9 +49,7 @@ #include <sys/queue.h> #include <miscfs/union/union.h> -#ifdef DIAGNOSTIC #include <sys/proc.h> -#endif /* must be power of two, otherwise change UNION_HASH() */ #define NHASH 32 @@ -71,6 +69,7 @@ union_init() for (i = 0; i < NHASH; i++) LIST_INIT(&unhead[i]); bzero((caddr_t) unvplock, sizeof(unvplock)); + return (0); } static int @@ -223,10 +222,10 @@ union_allocvp(vpp, mp, undvp, dvp, cnp, uppervp, lowervp) struct vnode *lowervp; /* may be null */ { int error; - struct union_node *un; + struct union_node *un = 0; struct union_node **pp; struct vnode *xlowervp = NULLVP; - int hash; + int hash = 0; int try; if (uppervp == NULLVP && lowervp == NULLVP) diff --git a/sys/miscfs/union/union_vfsops.c b/sys/miscfs/union/union_vfsops.c index 9fa2746..42931d7 100644 --- a/sys/miscfs/union/union_vfsops.c +++ b/sys/miscfs/union/union_vfsops.c @@ -73,7 +73,7 @@ union_mount(mp, path, data, ndp, p) struct ucred *cred = 0; struct ucred *scred; struct vattr va; - char *cp; + char *cp = 0; int len; u_int size; diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c index 96327b0..30f2233 100644 --- a/sys/miscfs/union/union_vnops.c +++ b/sys/miscfs/union/union_vnops.c @@ -162,7 +162,7 @@ union_lookup(ap) int lockparent = cnp->cn_flags & LOCKPARENT; int rdonly = cnp->cn_flags & RDONLY; struct union_mount *um = MOUNTTOUNIONMOUNT(dvp->v_mount); - struct ucred *saved_cred; + struct ucred *saved_cred = 0; cnp->cn_flags |= LOCKPARENT; |