diff options
author | phk <phk@FreeBSD.org> | 1995-11-07 13:39:31 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-11-07 13:39:31 +0000 |
commit | 06201558ede6232409ec4bfc8672ef2a64eaa0ee (patch) | |
tree | 5ec404e8e8dc9926c57f29c2582a00f2d4a3bb52 /sys/fs | |
parent | 7be91d15574536aac505ca78080ea6134bd26f6c (diff) | |
download | FreeBSD-src-06201558ede6232409ec4bfc8672ef2a64eaa0ee.zip FreeBSD-src-06201558ede6232409ec4bfc8672ef2a64eaa0ee.tar.gz |
Make a lot of private stuff static.
Should anybody out there wonder about this vendetta against global
variables, it is basically to make it more visible what our interfaces
in the kernel really are.
I'm almost convinced we should have a
#define PUBLIC /* public interface */
and use it in the #includes...
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/fdescfs/fdesc_vfsops.c | 24 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 44 | ||||
-rw-r--r-- | sys/fs/procfs/procfs.h | 28 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_vfsops.c | 26 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_vnops.c | 34 |
5 files changed, 78 insertions, 78 deletions
diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index 4794250..db40cb7 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94 * - * $Id: fdesc_vfsops.c,v 1.4 1995/03/16 20:23:38 wollman Exp $ + * $Id: fdesc_vfsops.c,v 1.5 1995/09/02 20:17:57 mpp Exp $ */ /* @@ -56,12 +56,12 @@ #include <sys/malloc.h> #include <miscfs/fdesc/fdesc.h> -int fdesc_statfs __P((struct mount *, struct statfs *, struct proc *)); +static int fdesc_statfs __P((struct mount *, struct statfs *, struct proc *)); /* * Mount the per-process file descriptors (/dev/fd) */ -int +static int fdesc_mount(mp, path, data, ndp, p) struct mount *mp; char *path; @@ -102,7 +102,7 @@ fdesc_mount(mp, path, data, ndp, p) return (0); } -int +static int fdesc_start(mp, flags, p) struct mount *mp; int flags; @@ -111,7 +111,7 @@ fdesc_start(mp, flags, p) return (0); } -int +static int fdesc_unmount(mp, mntflags, p) struct mount *mp; int mntflags; @@ -172,7 +172,7 @@ fdesc_root(mp, vpp) return (0); } -int +static int fdesc_quotactl(mp, cmd, uid, arg, p) struct mount *mp; int cmd; @@ -184,7 +184,7 @@ fdesc_quotactl(mp, cmd, uid, arg, p) return (EOPNOTSUPP); } -int +static int fdesc_statfs(mp, sbp, p) struct mount *mp; struct statfs *sbp; @@ -234,7 +234,7 @@ fdesc_statfs(mp, sbp, p) return (0); } -int +static int fdesc_sync(mp, waitfor) struct mount *mp; int waitfor; @@ -247,7 +247,7 @@ fdesc_sync(mp, waitfor) * Fdesc flat namespace lookup. * Currently unsupported. */ -int +static int fdesc_vget(mp, ino, vpp) struct mount *mp; ino_t ino; @@ -257,7 +257,7 @@ fdesc_vget(mp, ino, vpp) return (EOPNOTSUPP); } -int +static int fdesc_fhtovp(mp, fhp, setgen, vpp) struct mount *mp; struct fid *fhp; @@ -267,7 +267,7 @@ fdesc_fhtovp(mp, fhp, setgen, vpp) return (EOPNOTSUPP); } -int +static int fdesc_vptofh(vp, fhp) struct vnode *vp; struct fid *fhp; @@ -276,7 +276,7 @@ fdesc_vptofh(vp, fhp) return (EOPNOTSUPP); } -struct vfsops fdesc_vfsops = { +static struct vfsops fdesc_vfsops = { fdesc_mount, fdesc_start, fdesc_unmount, diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index fec7b44..3c334bb 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 * - * $Id: fdesc_vnops.c,v 1.9 1995/05/30 08:06:57 rgrimes Exp $ + * $Id: fdesc_vnops.c,v 1.10 1995/09/02 20:19:12 mpp Exp $ */ /* @@ -174,7 +174,7 @@ out:; * vp is the current namei directory * ndp is the name to locate in that directory... */ -int +static int fdesc_lookup(ap) struct vop_lookup_args /* { struct vnode * a_dvp; @@ -315,7 +315,7 @@ bad:; return (error); } -int +static int fdesc_open(ap) struct vop_open_args /* { struct vnode *a_vp; @@ -407,7 +407,7 @@ fdesc_attr(fd, vap, cred, p) return (error); } -int +static int fdesc_getattr(ap) struct vop_getattr_args /* { struct vnode *a_vp; @@ -482,7 +482,7 @@ fdesc_getattr(ap) return (error); } -int +static int fdesc_setattr(ap) struct vop_setattr_args /* { struct vnode *a_vp; @@ -551,7 +551,7 @@ static struct dirtmp { { 0 } }; -int +static int fdesc_readdir(ap) struct vop_readdir_args /* { struct vnode *a_vp; @@ -652,7 +652,7 @@ fdesc_readdir(ap) return (error); } -int +static int fdesc_readlink(ap) struct vop_readlink_args /* { struct vnode *a_vp; @@ -676,7 +676,7 @@ fdesc_readlink(ap) return (error); } -int +static int fdesc_read(ap) struct vop_read_args /* { struct vnode *a_vp; @@ -700,7 +700,7 @@ fdesc_read(ap) return (error); } -int +static int fdesc_write(ap) struct vop_write_args /* { struct vnode *a_vp; @@ -724,7 +724,7 @@ fdesc_write(ap) return (error); } -int +static int fdesc_ioctl(ap) struct vop_ioctl_args /* { struct vnode *a_vp; @@ -751,7 +751,7 @@ fdesc_ioctl(ap) return (error); } -int +static int fdesc_select(ap) struct vop_select_args /* { struct vnode *a_vp; @@ -776,7 +776,7 @@ fdesc_select(ap) return (error); } -int +static int fdesc_inactive(ap) struct vop_inactive_args /* { struct vnode *a_vp; @@ -792,7 +792,7 @@ fdesc_inactive(ap) return (0); } -int +static int fdesc_reclaim(ap) struct vop_reclaim_args /* { struct vnode *a_vp; @@ -810,7 +810,7 @@ fdesc_reclaim(ap) /* * Return POSIX pathconf information applicable to special devices. */ -int +static int fdesc_pathconf(ap) struct vop_pathconf_args /* { struct vnode *a_vp; @@ -848,7 +848,7 @@ fdesc_pathconf(ap) * Print out the contents of a /dev/fd vnode. */ /* ARGSUSED */ -int +static int fdesc_print(ap) struct vop_print_args /* { struct vnode *a_vp; @@ -860,7 +860,7 @@ fdesc_print(ap) } /*void*/ -int +static int fdesc_vfree(ap) struct vop_vfree_args /* { struct vnode *a_pvp; @@ -875,7 +875,7 @@ fdesc_vfree(ap) /* * /dev/fd vnode unsupported operation */ -int +static int fdesc_enotsupp() { @@ -885,7 +885,7 @@ fdesc_enotsupp() /* * /dev/fd "should never get here" operation */ -int +static int fdesc_badop() { @@ -896,7 +896,7 @@ fdesc_badop() /* * /dev/fd vnode null operation */ -int +static int fdesc_nullop() { @@ -936,8 +936,8 @@ fdesc_nullop() #define fdesc_update ((int (*) __P((struct vop_update_args *)))fdesc_enotsupp) #define fdesc_bwrite ((int (*) __P((struct vop_bwrite_args *)))fdesc_enotsupp) -int (**fdesc_vnodeop_p)(); -struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = { +static int (**fdesc_vnodeop_p)(); +static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = { { &vop_default_desc, vn_default_error }, { &vop_lookup_desc, fdesc_lookup }, /* lookup */ { &vop_create_desc, fdesc_create }, /* create */ @@ -981,7 +981,7 @@ struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = { { &vop_bwrite_desc, fdesc_bwrite }, /* bwrite */ { (struct vnodeop_desc*)NULL, (int(*)())NULL } }; -struct vnodeopv_desc fdesc_vnodeop_opv_desc = +static struct vnodeopv_desc fdesc_vnodeop_opv_desc = { &fdesc_vnodeop_p, fdesc_vnodeop_entries }; VNODEOP_SET(fdesc_vnodeop_opv_desc); diff --git a/sys/fs/procfs/procfs.h b/sys/fs/procfs/procfs.h index 22c3800..4632f2b 100644 --- a/sys/fs/procfs/procfs.h +++ b/sys/fs/procfs/procfs.h @@ -36,7 +36,7 @@ * * @(#)procfs.h 8.6 (Berkeley) 2/3/94 * - * $Id: procfs.h,v 1.4 1995/04/15 02:30:08 davidg Exp $ + * $Id: procfs.h,v 1.5 1995/05/25 01:35:22 davidg Exp $ */ /* @@ -145,19 +145,19 @@ int procfs_root __P((struct mount *, struct vnode **)); /* * Prototypes for procfs vnode ops */ -int procfs_badop(); /* varargs */ +static int procfs_badop(); /* varargs */ int procfs_rw __P((struct vop_read_args *)); -int procfs_lookup __P((struct vop_lookup_args *)); +static int procfs_lookup __P((struct vop_lookup_args *)); #define procfs_create ((int (*) __P((struct vop_create_args *))) procfs_badop) #define procfs_mknod ((int (*) __P((struct vop_mknod_args *))) procfs_badop) -int procfs_open __P((struct vop_open_args *)); -int procfs_close __P((struct vop_close_args *)); -int procfs_access __P((struct vop_access_args *)); -int procfs_getattr __P((struct vop_getattr_args *)); -int procfs_setattr __P((struct vop_setattr_args *)); +static int procfs_open __P((struct vop_open_args *)); +static int Procfs_close __P((struct vop_close_args *)); +static int procfs_access __P((struct vop_access_args *)); +static int procfs_getattr __P((struct vop_getattr_args *)); +static int procfs_setattr __P((struct vop_setattr_args *)); #define procfs_read procfs_rw #define procfs_write procfs_rw -int procfs_ioctl __P((struct vop_ioctl_args *)); +static int procfs_ioctl __P((struct vop_ioctl_args *)); #define procfs_select ((int (*) __P((struct vop_select_args *))) procfs_badop) #define procfs_mmap ((int (*) __P((struct vop_mmap_args *))) procfs_badop) #define procfs_fsync ((int (*) __P((struct vop_fsync_args *))) procfs_badop) @@ -168,16 +168,16 @@ int procfs_ioctl __P((struct vop_ioctl_args *)); #define procfs_mkdir ((int (*) __P((struct vop_mkdir_args *))) procfs_badop) #define procfs_rmdir ((int (*) __P((struct vop_rmdir_args *))) procfs_badop) #define procfs_symlink ((int (*) __P((struct vop_symlink_args *))) procfs_badop) -int procfs_readdir __P((struct vop_readdir_args *)); +static int procfs_readdir __P((struct vop_readdir_args *)); #define procfs_readlink ((int (*) __P((struct vop_readlink_args *))) procfs_badop) -int procfs_abortop __P((struct vop_abortop_args *)); -int procfs_inactive __P((struct vop_inactive_args *)); -int procfs_reclaim __P((struct vop_reclaim_args *)); +static int procfs_abortop __P((struct vop_abortop_args *)); +static int procfs_inactive __P((struct vop_inactive_args *)); +static int procfs_reclaim __P((struct vop_reclaim_args *)); #define procfs_lock ((int (*) __P((struct vop_lock_args *))) nullop) #define procfs_unlock ((int (*) __P((struct vop_unlock_args *))) nullop) #define procfs_bmap ((int (*) __P((struct vop_bmap_args *))) procfs_badop) #define procfs_strategy ((int (*) __P((struct vop_strategy_args *))) procfs_badop) -int procfs_print __P((struct vop_print_args *)); +static int procfs_print __P((struct vop_print_args *)); #define procfs_islocked ((int (*) __P((struct vop_islocked_args *))) nullop) #define procfs_advlock ((int (*) __P((struct vop_advlock_args *))) procfs_badop) #define procfs_blkatoff ((int (*) __P((struct vop_blkatoff_args *))) procfs_badop) diff --git a/sys/fs/procfs/procfs_vfsops.c b/sys/fs/procfs/procfs_vfsops.c index 4113063..50be77c 100644 --- a/sys/fs/procfs/procfs_vfsops.c +++ b/sys/fs/procfs/procfs_vfsops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vfsops.c 8.4 (Berkeley) 1/21/94 * - * $Id: procfs_vfsops.c,v 1.9 1995/03/16 20:23:42 wollman Exp $ + * $Id: procfs_vfsops.c,v 1.10 1995/05/25 01:35:23 davidg Exp $ */ /* @@ -56,7 +56,7 @@ #include <miscfs/procfs/procfs.h> #include <vm/vm.h> /* for PAGE_SIZE */ -int procfs_statfs __P((struct mount *, struct statfs *, struct proc *)); +static int procfs_statfs __P((struct mount *, struct statfs *, struct proc *)); /* * VFS Operations. @@ -64,7 +64,7 @@ int procfs_statfs __P((struct mount *, struct statfs *, struct proc *)); * mount system call */ /* ARGSUSED */ -int +static int procfs_mount(mp, path, data, ndp, p) struct mount *mp; char *path; @@ -99,7 +99,7 @@ procfs_mount(mp, path, data, ndp, p) /* * unmount system call */ -int +static int procfs_unmount(mp, mntflags, p) struct mount *mp; int mntflags; @@ -146,7 +146,7 @@ procfs_root(mp, vpp) /* */ /* ARGSUSED */ -int +static int procfs_start(mp, flags, p) struct mount *mp; int flags; @@ -159,7 +159,7 @@ procfs_start(mp, flags, p) /* * Get file system statistics. */ -int +static int procfs_statfs(mp, sbp, p) struct mount *mp; struct statfs *sbp; @@ -184,7 +184,7 @@ procfs_statfs(mp, sbp, p) } -int +static int procfs_quotactl(mp, cmds, uid, arg, p) struct mount *mp; int cmds; @@ -196,7 +196,7 @@ procfs_quotactl(mp, cmds, uid, arg, p) return (EOPNOTSUPP); } -int +static int procfs_sync(mp, waitfor) struct mount *mp; int waitfor; @@ -205,7 +205,7 @@ procfs_sync(mp, waitfor) return (0); } -int +static int procfs_vget(mp, ino, vpp) struct mount *mp; ino_t ino; @@ -215,7 +215,7 @@ procfs_vget(mp, ino, vpp) return (EOPNOTSUPP); } -int +static int procfs_fhtovp(mp, fhp, vpp) struct mount *mp; struct fid *fhp; @@ -225,7 +225,7 @@ procfs_fhtovp(mp, fhp, vpp) return (EINVAL); } -int +static int procfs_vptofh(vp, fhp) struct vnode *vp; struct fid *fhp; @@ -234,14 +234,14 @@ procfs_vptofh(vp, fhp) return EINVAL; } -int +static int procfs_init() { return (0); } -struct vfsops procfs_vfsops = { +static struct vfsops procfs_vfsops = { procfs_mount, procfs_start, procfs_unmount, diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index 9bf4836..c421569 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.6 (Berkeley) 2/7/94 * - * $Id: procfs_vnops.c,v 1.15 1995/08/11 07:26:26 davidg Exp $ + * $Id: procfs_vnops.c,v 1.16 1995/09/02 18:28:48 mpp Exp $ */ /* @@ -103,7 +103,7 @@ static pid_t atopid __P((const char *, u_int)); * is to support exclusive open on process * memory images. */ -int +static int procfs_open(ap) struct vop_open_args *ap; { @@ -138,7 +138,7 @@ procfs_open(ap) * nothing to do for procfs other than undo * any exclusive open flag (see _open above). */ -int +static int procfs_close(ap) struct vop_close_args *ap; { @@ -160,7 +160,7 @@ procfs_close(ap) * do an ioctl operation on pfsnode (vp). * (vp) is not locked on entry or exit. */ -int +static int procfs_ioctl(ap) struct vop_ioctl_args *ap; { @@ -184,7 +184,7 @@ procfs_ioctl(ap) * * (vp) is not locked on entry or exit. */ -int +static int procfs_inactive(ap) struct vop_inactive_args *ap; { @@ -203,7 +203,7 @@ procfs_inactive(ap) * to free any private data and remove the node * from any private lists. */ -int +static int procfs_reclaim(ap) struct vop_reclaim_args *ap; { @@ -216,7 +216,7 @@ procfs_reclaim(ap) /* * Return POSIX pathconf information applicable to special devices. */ -int +static int procfs_pathconf(ap) struct vop_pathconf_args /* { struct vnode *a_vp; @@ -255,7 +255,7 @@ procfs_pathconf(ap) * just print a readable description * of (vp). */ -int +static int procfs_print(ap) struct vop_print_args *ap; { @@ -273,7 +273,7 @@ procfs_print(ap) * for undoing any side-effects caused by the lookup. * this will always include freeing the pathname buffer. */ -int +static int procfs_abortop(ap) struct vop_abortop_args *ap; { @@ -286,7 +286,7 @@ procfs_abortop(ap) /* * generic entry point for unsupported operations */ -int +static int procfs_badop() { @@ -302,7 +302,7 @@ procfs_badop() * * this is relatively minimal for procfs. */ -int +static int procfs_getattr(ap) struct vop_getattr_args *ap; { @@ -438,7 +438,7 @@ procfs_getattr(ap) return (error); } -int +static int procfs_setattr(ap) struct vop_setattr_args *ap; { @@ -467,7 +467,7 @@ procfs_setattr(ap) * but does mean that the i/o entry points need to check * that the operation really does make sense. */ -int +static int procfs_access(ap) struct vop_access_args *ap; { @@ -520,7 +520,7 @@ found: * filesystem doesn't do any locking of its own. otherwise * read and inwardly digest ufs_lookup(). */ -int +static int procfs_lookup(ap) struct vop_lookup_args *ap; { @@ -634,7 +634,7 @@ procfs_lookup(ap) * * this should just be done through read() */ -int +static int procfs_readdir(ap) struct vop_readdir_args *ap; { @@ -800,7 +800,7 @@ atopid(b, len) * procfs vnode operations. */ int (**procfs_vnodeop_p)(); -struct vnodeopv_entry_desc procfs_vnodeop_entries[] = { +static struct vnodeopv_entry_desc procfs_vnodeop_entries[] = { { &vop_default_desc, vn_default_error }, { &vop_lookup_desc, procfs_lookup }, /* lookup */ { &vop_create_desc, procfs_create }, /* create */ @@ -843,7 +843,7 @@ struct vnodeopv_entry_desc procfs_vnodeop_entries[] = { { &vop_update_desc, procfs_update }, /* update */ { (struct vnodeop_desc*)NULL, (int(*)())NULL } }; -struct vnodeopv_desc procfs_vnodeop_opv_desc = +static struct vnodeopv_desc procfs_vnodeop_opv_desc = { &procfs_vnodeop_p, procfs_vnodeop_entries }; VNODEOP_SET(procfs_vnodeop_opv_desc); |