summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-11-07 13:39:31 +0000
committerphk <phk@FreeBSD.org>1995-11-07 13:39:31 +0000
commit06201558ede6232409ec4bfc8672ef2a64eaa0ee (patch)
tree5ec404e8e8dc9926c57f29c2582a00f2d4a3bb52 /sys/fs/procfs
parent7be91d15574536aac505ca78080ea6134bd26f6c (diff)
downloadFreeBSD-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/procfs')
-rw-r--r--sys/fs/procfs/procfs.h28
-rw-r--r--sys/fs/procfs/procfs_vfsops.c26
-rw-r--r--sys/fs/procfs/procfs_vnops.c34
3 files changed, 44 insertions, 44 deletions
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);
OpenPOWER on IntegriCloud