summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-12-17 21:23:44 +0000
committerphk <phk@FreeBSD.org>1995-12-17 21:23:44 +0000
commit02cbd66c6d015a152ab4b0c15cb19a4d854dc78f (patch)
treed9e9aadac9903141119e844926290aa59d3064c2 /sys/kern
parentb3abae23ca40c1ec028b9355289030d7071a4102 (diff)
downloadFreeBSD-src-02cbd66c6d015a152ab4b0c15cb19a4d854dc78f.zip
FreeBSD-src-02cbd66c6d015a152ab4b0c15cb19a4d854dc78f.tar.gz
Staticize.
Unstaticize a function in scsi/scsi_base that was used, with an undocumented option. My last count on the LINT kernel shows: Total symbols: 3647 unref symbols: 463 undef symbols: 4 1 ref symbols: 1751 2 ref symbols: 485 Approaching the pain threshold now.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_clock.c19
-rw-r--r--sys/kern/kern_tc.c19
-rw-r--r--sys/kern/kern_timeout.c19
-rw-r--r--sys/kern/vfs_export.c4
-rw-r--r--sys/kern/vfs_extattr.c6
-rw-r--r--sys/kern/vfs_init.c8
-rw-r--r--sys/kern/vfs_subr.c4
-rw-r--r--sys/kern/vfs_syscalls.c6
-rw-r--r--sys/kern/vfs_vnops.c25
9 files changed, 58 insertions, 52 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index a662efc..3a92899 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
- * $Id: kern_clock.c,v 1.22 1995/12/06 13:27:37 phk Exp $
+ * $Id: kern_clock.c,v 1.23 1995/12/07 12:46:37 davidg Exp $
*/
/* Portions of this software are covered by the following: */
@@ -83,13 +83,14 @@
static void initclocks __P((void *dummy));
SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
-/* Does anybody else really care about these? */
-struct callout *callfree, *callout, calltodo;
+/* Does anybody else really care about these? (yes, machdep.c) */
+static struct callout calltodo;
+struct callout *callfree, *callout;
/* Some of these don't belong here, but it's easiest to concentrate them. */
-long cp_time[CPUSTATES];
+static long cp_time[CPUSTATES];
long dk_seek[DK_NDRIVE];
-long dk_time[DK_NDRIVE];
+static long dk_time[DK_NDRIVE];
long dk_wds[DK_NDRIVE];
long dk_wpms[DK_NDRIVE];
long dk_xfer[DK_NDRIVE];
@@ -151,7 +152,7 @@ int profhz;
int profprocs;
int ticks;
static int psdiv, pscnt; /* prof => stat divider */
-int psratio; /* ratio: prof / stat */
+static int psratio; /* ratio: prof / stat */
volatile struct timeval time;
volatile struct timeval mono_time;
@@ -221,10 +222,10 @@ long time_esterror = MAXPHASE; /* estimated error (us) */
* and to increase the time_maxerror as the time since last update
* increases.
*/
-long time_phase = 0; /* phase offset (scaled us) */
+static long time_phase = 0; /* phase offset (scaled us) */
long time_freq = 0; /* frequency offset (scaled ppm) */
-long time_adj = 0; /* tick adjust (scaled 1 / hz) */
-long time_reftime = 0; /* time at last adjustment (s) */
+static long time_adj = 0; /* tick adjust (scaled 1 / hz) */
+static long time_reftime = 0; /* time at last adjustment (s) */
#ifdef PPS_SYNC
/*
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index a662efc..3a92899 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
- * $Id: kern_clock.c,v 1.22 1995/12/06 13:27:37 phk Exp $
+ * $Id: kern_clock.c,v 1.23 1995/12/07 12:46:37 davidg Exp $
*/
/* Portions of this software are covered by the following: */
@@ -83,13 +83,14 @@
static void initclocks __P((void *dummy));
SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
-/* Does anybody else really care about these? */
-struct callout *callfree, *callout, calltodo;
+/* Does anybody else really care about these? (yes, machdep.c) */
+static struct callout calltodo;
+struct callout *callfree, *callout;
/* Some of these don't belong here, but it's easiest to concentrate them. */
-long cp_time[CPUSTATES];
+static long cp_time[CPUSTATES];
long dk_seek[DK_NDRIVE];
-long dk_time[DK_NDRIVE];
+static long dk_time[DK_NDRIVE];
long dk_wds[DK_NDRIVE];
long dk_wpms[DK_NDRIVE];
long dk_xfer[DK_NDRIVE];
@@ -151,7 +152,7 @@ int profhz;
int profprocs;
int ticks;
static int psdiv, pscnt; /* prof => stat divider */
-int psratio; /* ratio: prof / stat */
+static int psratio; /* ratio: prof / stat */
volatile struct timeval time;
volatile struct timeval mono_time;
@@ -221,10 +222,10 @@ long time_esterror = MAXPHASE; /* estimated error (us) */
* and to increase the time_maxerror as the time since last update
* increases.
*/
-long time_phase = 0; /* phase offset (scaled us) */
+static long time_phase = 0; /* phase offset (scaled us) */
long time_freq = 0; /* frequency offset (scaled ppm) */
-long time_adj = 0; /* tick adjust (scaled 1 / hz) */
-long time_reftime = 0; /* time at last adjustment (s) */
+static long time_adj = 0; /* tick adjust (scaled 1 / hz) */
+static long time_reftime = 0; /* time at last adjustment (s) */
#ifdef PPS_SYNC
/*
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index a662efc..3a92899 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
- * $Id: kern_clock.c,v 1.22 1995/12/06 13:27:37 phk Exp $
+ * $Id: kern_clock.c,v 1.23 1995/12/07 12:46:37 davidg Exp $
*/
/* Portions of this software are covered by the following: */
@@ -83,13 +83,14 @@
static void initclocks __P((void *dummy));
SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL)
-/* Does anybody else really care about these? */
-struct callout *callfree, *callout, calltodo;
+/* Does anybody else really care about these? (yes, machdep.c) */
+static struct callout calltodo;
+struct callout *callfree, *callout;
/* Some of these don't belong here, but it's easiest to concentrate them. */
-long cp_time[CPUSTATES];
+static long cp_time[CPUSTATES];
long dk_seek[DK_NDRIVE];
-long dk_time[DK_NDRIVE];
+static long dk_time[DK_NDRIVE];
long dk_wds[DK_NDRIVE];
long dk_wpms[DK_NDRIVE];
long dk_xfer[DK_NDRIVE];
@@ -151,7 +152,7 @@ int profhz;
int profprocs;
int ticks;
static int psdiv, pscnt; /* prof => stat divider */
-int psratio; /* ratio: prof / stat */
+static int psratio; /* ratio: prof / stat */
volatile struct timeval time;
volatile struct timeval mono_time;
@@ -221,10 +222,10 @@ long time_esterror = MAXPHASE; /* estimated error (us) */
* and to increase the time_maxerror as the time since last update
* increases.
*/
-long time_phase = 0; /* phase offset (scaled us) */
+static long time_phase = 0; /* phase offset (scaled us) */
long time_freq = 0; /* frequency offset (scaled ppm) */
-long time_adj = 0; /* tick adjust (scaled 1 / hz) */
-long time_reftime = 0; /* time at last adjustment (s) */
+static long time_adj = 0; /* tick adjust (scaled 1 / hz) */
+static long time_reftime = 0; /* time at last adjustment (s) */
#ifdef PPS_SYNC
/*
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index dd7a992..ae38c24 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
- * $Id: vfs_subr.c,v 1.47 1995/12/07 12:47:04 davidg Exp $
+ * $Id: vfs_subr.c,v 1.48 1995/12/11 04:56:09 dyson Exp $
*/
/*
@@ -887,7 +887,7 @@ holdrele(vp)
* that are found.
*/
#ifdef DIAGNOSTIC
-int busyprt = 0; /* print out busy vnodes */
+static int busyprt = 0; /* print out busy vnodes */
SYSCTL_INT(_debug, 1, busyprt, CTLFLAG_RW, &busyprt, 0, "");
#endif
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 4127e07..a1e3087 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
- * $Id: vfs_syscalls.c,v 1.42 1995/12/07 12:47:06 davidg Exp $
+ * $Id: vfs_syscalls.c,v 1.43 1995/12/11 04:56:11 dyson Exp $
*/
#include <sys/param.h>
@@ -317,10 +317,6 @@ dounmount(mp, flags, p)
/*
* Sync each mounted filesystem.
*/
-#ifdef DIAGNOSTIC
-int syncprt = 0;
-SYSCTL_INT(_debug, 0, syncprt, CTLFLAG_RW, &syncprt, 0, "");
-#endif
#ifndef _SYS_SYSPROTO_H_
struct sync_args {
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index 704b6f8..bbaa9cf 100644
--- a/sys/kern/vfs_init.c
+++ b/sys/kern/vfs_init.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_init.c 8.3 (Berkeley) 1/4/94
- * $Id: vfs_init.c,v 1.17 1995/12/03 18:00:35 bde Exp $
+ * $Id: vfs_init.c,v 1.18 1995/12/04 16:48:34 phk Exp $
*/
@@ -56,7 +56,7 @@
#include <vm/vm.h>
#include <sys/sysctl.h>
-extern void vfs_op_init __P((void));
+static void vfs_op_init __P((void));
static void vfsinit __P((void *));
SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, vfsinit, NULL)
@@ -87,7 +87,7 @@ extern struct vnodeop_desc *vfs_op_descs[];
* extra level of indirection for arrays. It's an interesting
* "feature" of C.
*/
-int vfs_opv_numops;
+static int vfs_opv_numops;
/*
* A miscellaneous routine.
@@ -202,7 +202,7 @@ vfs_opv_init(struct vnodeopv_desc **them)
/*
* Initialize known vnode operations vectors.
*/
-void
+static void
vfs_op_init()
{
int i;
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index dd7a992..ae38c24 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
- * $Id: vfs_subr.c,v 1.47 1995/12/07 12:47:04 davidg Exp $
+ * $Id: vfs_subr.c,v 1.48 1995/12/11 04:56:09 dyson Exp $
*/
/*
@@ -887,7 +887,7 @@ holdrele(vp)
* that are found.
*/
#ifdef DIAGNOSTIC
-int busyprt = 0; /* print out busy vnodes */
+static int busyprt = 0; /* print out busy vnodes */
SYSCTL_INT(_debug, 1, busyprt, CTLFLAG_RW, &busyprt, 0, "");
#endif
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 4127e07..a1e3087 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
- * $Id: vfs_syscalls.c,v 1.42 1995/12/07 12:47:06 davidg Exp $
+ * $Id: vfs_syscalls.c,v 1.43 1995/12/11 04:56:11 dyson Exp $
*/
#include <sys/param.h>
@@ -317,10 +317,6 @@ dounmount(mp, flags, p)
/*
* Sync each mounted filesystem.
*/
-#ifdef DIAGNOSTIC
-int syncprt = 0;
-SYSCTL_INT(_debug, 0, syncprt, CTLFLAG_RW, &syncprt, 0, "");
-#endif
#ifndef _SYS_SYSPROTO_H_
struct sync_args {
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 9e00801..78a43a7 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94
- * $Id: vfs_vnops.c,v 1.20 1995/12/07 12:47:07 davidg Exp $
+ * $Id: vfs_vnops.c,v 1.21 1995/12/11 04:56:13 dyson Exp $
*/
#include <sys/param.h>
@@ -56,6 +56,17 @@
#include <vm/vm_object.h>
#include <vm/vnode_pager.h>
+static int vn_closefile __P((struct file *fp, struct proc *p));
+static int vn_ioctl __P((struct file *fp, int com, caddr_t data,
+ struct proc *p));
+static int vn_read __P((struct file *fp, struct uio *uio,
+ struct ucred *cred));
+static int vn_select __P((struct file *fp, int which, struct proc *p));
+static int vn_vmio_open __P((struct vnode *vp, struct proc *p,
+ struct ucred *cred));
+static int vn_write __P((struct file *fp, struct uio *uio,
+ struct ucred *cred));
+
struct fileops vnops =
{ vn_read, vn_write, vn_ioctl, vn_select, vn_closefile };
@@ -255,7 +266,7 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, cred, aresid, p)
/*
* File table vnode read routine.
*/
-int
+static int
vn_read(fp, uio, cred)
struct file *fp;
struct uio *uio;
@@ -278,7 +289,7 @@ vn_read(fp, uio, cred)
/*
* File table vnode write routine.
*/
-int
+static int
vn_write(fp, uio, cred)
struct file *fp;
struct uio *uio;
@@ -377,7 +388,7 @@ vn_stat(vp, sb, p)
/*
* File table vnode ioctl routine.
*/
-int
+static int
vn_ioctl(fp, com, data, p)
struct file *fp;
int com;
@@ -430,7 +441,7 @@ vn_ioctl(fp, com, data, p)
/*
* File table vnode select routine.
*/
-int
+static int
vn_select(fp, which, p)
struct file *fp;
int which;
@@ -444,7 +455,7 @@ vn_select(fp, which, p)
/*
* File table vnode close routine.
*/
-int
+static int
vn_closefile(fp, p)
struct file *fp;
struct proc *p;
@@ -454,7 +465,7 @@ vn_closefile(fp, p)
fp->f_cred, p));
}
-int
+static int
vn_vmio_open(vp, p, cred)
struct vnode *vp;
struct proc *p;
OpenPOWER on IntegriCloud