summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1998-02-09 06:11:36 +0000
committereivind <eivind@FreeBSD.org>1998-02-09 06:11:36 +0000
commitd7a6ab28035779065026b70dca440892d819c0bc (patch)
tree930fd4603b42a095e9f3669517dea29274323575
parent4538098d0b3fbe09f64c578b730483a6e77ff40f (diff)
downloadFreeBSD-src-d7a6ab28035779065026b70dca440892d819c0bc.zip
FreeBSD-src-d7a6ab28035779065026b70dca440892d819c0bc.tar.gz
Staticize.
-rw-r--r--sys/alpha/linux/linux_sysvec.c26
-rw-r--r--sys/amd64/amd64/bios.c8
-rw-r--r--sys/amd64/amd64/mp_machdep.c12
-rw-r--r--sys/amd64/amd64/mptable.c12
-rw-r--r--sys/amd64/amd64/pmap.c30
-rw-r--r--sys/amd64/amd64/sys_machdep.c4
-rw-r--r--sys/amd64/amd64/tsc.c4
-rw-r--r--sys/amd64/include/mptable.h12
-rw-r--r--sys/amd64/isa/clock.c4
-rw-r--r--sys/amd64/isa/intr_machdep.c4
-rw-r--r--sys/amd64/isa/nmi.c4
-rw-r--r--sys/ddb/db_command.c4
-rw-r--r--sys/dev/bktr/bktr_core.c16
-rw-r--r--sys/dev/eisa/eisaconf.c8
-rw-r--r--sys/dev/en/midway.c2
-rw-r--r--sys/dev/fxp/if_fxp.c16
-rw-r--r--sys/dev/ie/if_ie.c12
-rw-r--r--sys/dev/pdq/if_fpa.c4
-rw-r--r--sys/dev/ppbus/ppbconf.c4
-rw-r--r--sys/dev/rp/rp.c12
-rw-r--r--sys/dev/speaker/spkr.c4
-rw-r--r--sys/dev/sr/if_sr_pci.c4
-rw-r--r--sys/dev/tx/if_tx.c2
-rw-r--r--sys/dev/vn/vn.c6
-rw-r--r--sys/dev/vx/if_vx_eisa.c2
-rw-r--r--sys/fs/cd9660/cd9660_node.c8
-rw-r--r--sys/fs/fdescfs/fdesc_vnops.c6
-rw-r--r--sys/fs/msdosfs/msdosfs_conv.c14
-rw-r--r--sys/fs/msdosfs/msdosfs_denode.c6
-rw-r--r--sys/fs/msdosfs/msdosfs_fat.c12
-rw-r--r--sys/fs/nullfs/null_subr.c6
-rw-r--r--sys/fs/procfs/procfs_vnops.c4
-rw-r--r--sys/fs/umapfs/umap_subr.c6
-rw-r--r--sys/gnu/ext2fs/ext2_ihash.c8
-rw-r--r--sys/i386/apm/apm.c4
-rw-r--r--sys/i386/bios/apm.c4
-rw-r--r--sys/i386/eisa/eisaconf.c8
-rw-r--r--sys/i386/eisa/if_vx_eisa.c2
-rw-r--r--sys/i386/i386/bios.c8
-rw-r--r--sys/i386/i386/mp_machdep.c12
-rw-r--r--sys/i386/i386/mptable.c12
-rw-r--r--sys/i386/i386/pmap.c30
-rw-r--r--sys/i386/i386/sys_machdep.c4
-rw-r--r--sys/i386/i386/tsc.c4
-rw-r--r--sys/i386/ibcs2/imgact_coff.c12
-rw-r--r--sys/i386/include/mptable.h12
-rw-r--r--sys/i386/isa/aic6360.c6
-rw-r--r--sys/i386/isa/atapi.c2
-rw-r--r--sys/i386/isa/clock.c4
-rw-r--r--sys/i386/isa/if_ie.c12
-rw-r--r--sys/i386/isa/intr_machdep.c4
-rw-r--r--sys/i386/isa/istallion.c10
-rw-r--r--sys/i386/isa/nmi.c4
-rw-r--r--sys/i386/isa/pcvt/pcvt_drv.c4
-rw-r--r--sys/i386/isa/pnp.c20
-rw-r--r--sys/i386/isa/rp.c12
-rw-r--r--sys/i386/isa/sound/ad1848.c4
-rw-r--r--sys/i386/isa/sound/dev_table.c12
-rw-r--r--sys/i386/isa/sound/gus_card.c2
-rw-r--r--sys/i386/isa/sound/gus_wave.c193
-rw-r--r--sys/i386/isa/sound/midibuf.c4
-rw-r--r--sys/i386/isa/sound/opl3.c2
-rw-r--r--sys/i386/isa/sound/pas2_card.c8
-rw-r--r--sys/i386/isa/sound/pas2_mixer.c2
-rw-r--r--sys/i386/isa/sound/pas2_pcm.c6
-rw-r--r--sys/i386/isa/sound/sb_dsp.c10
-rw-r--r--sys/i386/isa/sound/sb_midi.c4
-rw-r--r--sys/i386/isa/sound/sequencer.c10
-rw-r--r--sys/i386/isa/sound/soundcard.c23
-rw-r--r--sys/i386/isa/spkr.c4
-rw-r--r--sys/i386/isa/stallion.c10
-rw-r--r--sys/i386/isa/wcd.c8
-rw-r--r--sys/i386/isa/wfd.c6
-rw-r--r--sys/i386/linux/imgact_linux.c8
-rw-r--r--sys/i386/linux/linux_sysvec.c26
-rw-r--r--sys/isa/atrtc.c4
-rw-r--r--sys/isofs/cd9660/cd9660_node.c8
-rw-r--r--sys/kern/imgact_elf.c6
-rw-r--r--sys/kern/kern_malloc.c4
-rw-r--r--sys/kern/kern_proc.c4
-rw-r--r--sys/kern/kern_resource.c10
-rw-r--r--sys/kern/subr_smp.c12
-rw-r--r--sys/kern/sys_pipe.c6
-rw-r--r--sys/kern/sysv_shm.c4
-rw-r--r--sys/kern/uipc_syscalls.c10
-rw-r--r--sys/kern/vfs_aio.c34
-rw-r--r--sys/kern/vfs_bio.c11
-rw-r--r--sys/kern/vfs_conf.c4
-rw-r--r--sys/kern/vfs_export.c6
-rw-r--r--sys/kern/vfs_init.c4
-rw-r--r--sys/kern/vfs_mount.c4
-rw-r--r--sys/kern/vfs_subr.c6
-rw-r--r--sys/miscfs/fdesc/fdesc_vnops.c6
-rw-r--r--sys/miscfs/nullfs/null_subr.c6
-rw-r--r--sys/miscfs/procfs/procfs_vnops.c4
-rw-r--r--sys/miscfs/umapfs/umap_subr.c6
-rw-r--r--sys/msdosfs/msdosfs_conv.c14
-rw-r--r--sys/msdosfs/msdosfs_denode.c6
-rw-r--r--sys/msdosfs/msdosfs_fat.c12
-rw-r--r--sys/net/if_media.c6
-rw-r--r--sys/net/if_sl.c4
-rw-r--r--sys/net/if_spppsubr.c12
-rw-r--r--sys/net/route.c4
-rw-r--r--sys/net/zlib.c4
-rw-r--r--sys/netatalk/aarp.c6
-rw-r--r--sys/netatalk/ddp_pcb.c4
-rw-r--r--sys/netatalk/ddp_usrreq.c4
-rw-r--r--sys/netinet/ip_fw.c4
-rw-r--r--sys/netinet/ip_mroute.c6
-rw-r--r--sys/netipx/ipx_input.c8
-rw-r--r--sys/netipx/ipx_ip.c16
-rw-r--r--sys/netipx/ipx_outputfl.c4
-rw-r--r--sys/netipx/ipx_pcb.c4
-rw-r--r--sys/netipx/ipx_proto.c4
-rw-r--r--sys/netipx/ipx_usrreq.c6
-rw-r--r--sys/netipx/spx_usrreq.c22
-rw-r--r--sys/netnatm/natm.c8
-rw-r--r--sys/netnatm/natm_proto.c6
-rw-r--r--sys/nfs/bootp_subr.c19
-rw-r--r--sys/nfs/nfs_node.c8
-rw-r--r--sys/nfs/nfs_serv.c4
-rw-r--r--sys/nfs/nfs_srvcache.c10
-rw-r--r--sys/nfs/nfs_syscalls.c4
-rw-r--r--sys/nfs/nfs_vfsops.c7
-rw-r--r--sys/nfsclient/bootp_subr.c19
-rw-r--r--sys/nfsclient/nfs_nfsiod.c4
-rw-r--r--sys/nfsclient/nfs_node.c8
-rw-r--r--sys/nfsclient/nfs_vfsops.c7
-rw-r--r--sys/nfsserver/nfs_serv.c4
-rw-r--r--sys/nfsserver/nfs_srvcache.c10
-rw-r--r--sys/nfsserver/nfs_syscalls.c4
-rw-r--r--sys/pc98/pc98/wfd.c6
-rw-r--r--sys/pci/brooktree848.c16
-rw-r--r--sys/pci/if_fpa.c4
-rw-r--r--sys/pci/if_fxp.c16
-rw-r--r--sys/pci/if_sr_p.c4
-rw-r--r--sys/pci/if_tx.c2
-rw-r--r--sys/pci/ncr.c6
-rw-r--r--sys/pci/tek390.c76
-rw-r--r--sys/scsi/worm.c4
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c4
-rw-r--r--sys/ufs/mfs/mfs_vfsops.c4
-rw-r--r--sys/ufs/ufs/ufs_ihash.c8
-rw-r--r--sys/ufs/ufs/ufs_quota.c4
-rw-r--r--sys/ufs/ufs/ufs_vnops.c8
-rw-r--r--sys/vm/swap_pager.c4
-rw-r--r--sys/vm/vm_fault.c7
-rw-r--r--sys/vm/vm_glue.c6
-rw-r--r--sys/vm/vm_map.c8
-rw-r--r--sys/vm/vm_object.c6
-rw-r--r--sys/vm/vm_page.c8
-rw-r--r--sys/vm/vm_pageout.c22
-rw-r--r--sys/vm/vm_zone.c8
153 files changed, 758 insertions, 722 deletions
diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c
index 3c60ca0..8c128ee 100644
--- a/sys/alpha/linux/linux_sysvec.c
+++ b/sys/alpha/linux/linux_sysvec.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_sysvec.c,v 1.22 1998/02/04 22:32:28 eivind Exp $
+ * $Id: linux_sysvec.c,v 1.23 1998/02/06 12:13:19 eivind Exp $
*/
/* XXX we use functions that might not exist. */
@@ -56,10 +56,14 @@
#include <i386/linux/linux.h>
#include <i386/linux/linux_proto.h>
-int linux_fixup __P((int **stack_base, struct image_params *iparams));
-int elf_linux_fixup __P((int **stack_base, struct image_params *iparams));
-void linux_prepsyscall __P((struct trapframe *tf, int *args, u_int *code, caddr_t *params));
-void linux_sendsig __P((sig_t catcher, int sig, int mask, u_long code));
+static int linux_fixup __P((int **stack_base,
+ struct image_params *iparams));
+static int elf_linux_fixup __P((int **stack_base,
+ struct image_params *iparams));
+static void linux_prepsyscall __P((struct trapframe *tf, int *args,
+ u_int *code, caddr_t *params));
+static void linux_sendsig __P((sig_t catcher, int sig, int mask,
+ u_long code));
/*
* Linux syscalls return negative errno's, we do positive and map them
@@ -94,7 +98,8 @@ int linux_to_bsd_signal[LINUX_NSIG] = {
SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH, SIGURG, SIGURG, 0
};
-int linux_fixup(int **stack_base, struct image_params *imgp)
+static int
+linux_fixup(int **stack_base, struct image_params *imgp)
{
int *argv, *envp;
@@ -109,7 +114,8 @@ int linux_fixup(int **stack_base, struct image_params *imgp)
return 0;
}
-int elf_linux_fixup(int **stack_base, struct image_params *imgp)
+static int
+elf_linux_fixup(int **stack_base, struct image_params *imgp)
{
Elf32_Auxargs *args = (Elf32_Auxargs *)imgp->auxargs;
int *pos;
@@ -156,7 +162,7 @@ extern int _ucodesel, _udatasel;
* specified pc, psl.
*/
-void
+static void
linux_sendsig(sig_t catcher, int sig, int mask, u_long code)
{
register struct proc *p = curproc;
@@ -349,7 +355,7 @@ linux_sigreturn(p, args)
return (EJUSTRETURN);
}
-void
+static void
linux_prepsyscall(struct trapframe *tf, int *args, u_int *code, caddr_t *params)
{
args[0] = tf->tf_ebx;
@@ -395,7 +401,7 @@ struct sysentvec elf_linux_sysvec = {
/*
* Installed either via SYSINIT() or via LKM stubs.
*/
-Elf32_Brandinfo linux_brand = {
+static Elf32_Brandinfo linux_brand = {
"Linux",
"/compat/linux",
"/lib/ld-linux.so.1",
diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c
index b28deb3..88e6103 100644
--- a/sys/amd64/amd64/bios.c
+++ b/sys/amd64/amd64/bios.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bios.c,v 1.8 1997/11/07 08:52:26 phk Exp $
+ * $Id: bios.c,v 1.9 1998/01/01 13:26:55 msmith Exp $
*/
/*
@@ -43,9 +43,9 @@
#define BIOS_SIZE 0x20000
/* exported lookup results */
-struct bios32_SDentry PCIbios = {entry : 0};
-struct SMBIOS_table *SMBIOStable = 0;
-struct DMI_table *DMItable = 0;
+struct bios32_SDentry PCIbios = {entry : 0};
+static struct SMBIOS_table *SMBIOStable = 0;
+static struct DMI_table *DMItable = 0;
static caddr_t bios32_SDCI = NULL;
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 7397775..0b5a162 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.63 1997/12/15 01:14:10 tegge Exp $
+ * $Id: mp_machdep.c,v 1.64 1997/12/15 02:18:20 tegge Exp $
*/
#include "opt_smp.h"
@@ -265,7 +265,7 @@ static struct {
/* Bitmap of all available CPUs */
u_int all_cpus;
-/* AP uses this PTD during bootstrap */
+/* AP uses this PTD during bootstrap. Do not staticize. */
pd_entry_t *bootPTD;
/* Hotwire a 0->4MB V==P mapping */
@@ -689,10 +689,10 @@ static int default_data[7][5] =
/* the bus data */
-bus_datum bus_data[NBUS];
+static bus_datum bus_data[NBUS];
/* the IO INT data, one entry per possible APIC INTerrupt */
-io_int io_apic_ints[NINTR];
+static io_int io_apic_ints[NINTR];
static int nintrs;
@@ -1984,12 +1984,13 @@ int smp_active = 0; /* are the APs allowed to run? */
SYSCTL_INT(_machdep, OID_AUTO, smp_active, CTLFLAG_RW, &smp_active, 0, "");
/* XXX maybe should be hw.ncpu */
-int smp_cpus = 1; /* how many cpu's running */
+static int smp_cpus = 1; /* how many cpu's running */
SYSCTL_INT(_machdep, OID_AUTO, smp_cpus, CTLFLAG_RD, &smp_cpus, 0, "");
int invltlb_ok = 0; /* throttle smp_invltlb() till safe */
SYSCTL_INT(_machdep, OID_AUTO, invltlb_ok, CTLFLAG_RW, &invltlb_ok, 0, "");
+/* Warning: Do not staticize. Used from swtch.s */
int do_page_zero_idle = 0; /* bzero pages for fun and profit in idleloop */
SYSCTL_INT(_machdep, OID_AUTO, do_page_zero_idle, CTLFLAG_RW,
&do_page_zero_idle, 0, "");
@@ -2092,6 +2093,7 @@ putfmtrr()
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
+/* Do not staticize. Used from apic_vector.s */
struct proc* checkstate_curproc[NCPU];
int checkstate_cpustate[NCPU];
u_long checkstate_pc[NCPU];
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index 7397775..0b5a162 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.63 1997/12/15 01:14:10 tegge Exp $
+ * $Id: mp_machdep.c,v 1.64 1997/12/15 02:18:20 tegge Exp $
*/
#include "opt_smp.h"
@@ -265,7 +265,7 @@ static struct {
/* Bitmap of all available CPUs */
u_int all_cpus;
-/* AP uses this PTD during bootstrap */
+/* AP uses this PTD during bootstrap. Do not staticize. */
pd_entry_t *bootPTD;
/* Hotwire a 0->4MB V==P mapping */
@@ -689,10 +689,10 @@ static int default_data[7][5] =
/* the bus data */
-bus_datum bus_data[NBUS];
+static bus_datum bus_data[NBUS];
/* the IO INT data, one entry per possible APIC INTerrupt */
-io_int io_apic_ints[NINTR];
+static io_int io_apic_ints[NINTR];
static int nintrs;
@@ -1984,12 +1984,13 @@ int smp_active = 0; /* are the APs allowed to run? */
SYSCTL_INT(_machdep, OID_AUTO, smp_active, CTLFLAG_RW, &smp_active, 0, "");
/* XXX maybe should be hw.ncpu */
-int smp_cpus = 1; /* how many cpu's running */
+static int smp_cpus = 1; /* how many cpu's running */
SYSCTL_INT(_machdep, OID_AUTO, smp_cpus, CTLFLAG_RD, &smp_cpus, 0, "");
int invltlb_ok = 0; /* throttle smp_invltlb() till safe */
SYSCTL_INT(_machdep, OID_AUTO, invltlb_ok, CTLFLAG_RW, &invltlb_ok, 0, "");
+/* Warning: Do not staticize. Used from swtch.s */
int do_page_zero_idle = 0; /* bzero pages for fun and profit in idleloop */
SYSCTL_INT(_machdep, OID_AUTO, do_page_zero_idle, CTLFLAG_RW,
&do_page_zero_idle, 0, "");
@@ -2092,6 +2093,7 @@ putfmtrr()
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
+/* Do not staticize. Used from apic_vector.s */
struct proc* checkstate_curproc[NCPU];
int checkstate_cpustate[NCPU];
u_long checkstate_pc[NCPU];
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 0a2024d..73ea393 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.182 1998/02/05 03:31:42 dyson Exp $
+ * $Id: pmap.c,v 1.183 1998/02/06 12:13:09 eivind Exp $
*/
/*
@@ -152,22 +152,22 @@ vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */
vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */
static boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */
static vm_offset_t vm_first_phys;
-int pgeflag; /* PG_G or-in */
-int pseflag; /* PG_PS or-in */
-int pv_npg;
+static int pgeflag; /* PG_G or-in */
+static int pseflag; /* PG_PS or-in */
+static int pv_npg;
-int nkpt;
+static int nkpt;
vm_offset_t kernel_vm_end;
/*
* Data for the pv entry allocation mechanism
*/
-vm_zone_t pvzone;
-struct vm_zone pvzone_store;
-struct vm_object pvzone_obj;
-int pv_entry_count=0, pv_entry_max=0, pv_entry_high_water=0;
-int pmap_pagedaemon_waken = 0;
-struct pv_entry *pvinit;
+static vm_zone_t pvzone;
+static struct vm_zone pvzone_store;
+static struct vm_object pvzone_obj;
+static int pv_entry_count=0, pv_entry_max=0, pv_entry_high_water=0;
+static int pmap_pagedaemon_waken = 0;
+static struct pv_entry *pvinit;
/*
* All those kernel PT submaps that BSD is so fond of
@@ -187,8 +187,8 @@ extern pd_entry_t *IdlePTDS[];
extern pt_entry_t SMP_prvpt[];
#endif
-pt_entry_t *PMAP1 = 0;
-unsigned *PADDR1 = 0;
+static pt_entry_t *PMAP1 = 0;
+static unsigned *PADDR1 = 0;
static PMAP_INLINE void free_pv_entry __P((pv_entry_t pv));
static unsigned * get_ptbase __P((pmap_t pmap));
@@ -219,7 +219,7 @@ static int pmap_unuse_pt __P((pmap_t, vm_offset_t, vm_page_t));
vm_offset_t pmap_kmem_choose(vm_offset_t addr) ;
void pmap_collect(void);
-unsigned pdir4mb;
+static unsigned pdir4mb;
/*
* Routine: pmap_pte
@@ -252,7 +252,7 @@ pmap_pte(pmap, va)
* by using a large (4MB) page for much of the kernel
* (.text, .data, .bss)
*/
-vm_offset_t
+static vm_offset_t
pmap_kmem_choose(vm_offset_t addr) {
vm_offset_t newaddr = addr;
#ifndef DISABLE_PSE
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index 435e451..d3fae02 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
- * $Id: sys_machdep.c,v 1.30 1997/11/26 22:45:47 joerg Exp $
+ * $Id: sys_machdep.c,v 1.31 1997/12/27 03:00:59 peter Exp $
*
*/
@@ -253,7 +253,7 @@ done:
#ifdef USER_LDT
/*
* Update the GDT entry pointing to the LDT to point to the LDT of the
- * current process.
+ * current process. Do not staticize.
*/
void
set_user_ldt(struct pcb *pcb)
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index da85b08..0732bd1 100644
--- a/sys/amd64/amd64/tsc.c
+++ b/sys/amd64/amd64/tsc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.107 1997/12/28 17:33:10 phk Exp $
+ * $Id: clock.c,v 1.108 1998/01/28 10:41:33 phk Exp $
*/
/*
@@ -132,7 +132,7 @@ u_int tsc_bias;
u_int tsc_comultiplier;
u_int tsc_freq;
u_int tsc_multiplier;
-u_int tsc_present;
+static u_int tsc_present;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
static int beeping = 0;
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index 7397775..0b5a162 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.63 1997/12/15 01:14:10 tegge Exp $
+ * $Id: mp_machdep.c,v 1.64 1997/12/15 02:18:20 tegge Exp $
*/
#include "opt_smp.h"
@@ -265,7 +265,7 @@ static struct {
/* Bitmap of all available CPUs */
u_int all_cpus;
-/* AP uses this PTD during bootstrap */
+/* AP uses this PTD during bootstrap. Do not staticize. */
pd_entry_t *bootPTD;
/* Hotwire a 0->4MB V==P mapping */
@@ -689,10 +689,10 @@ static int default_data[7][5] =
/* the bus data */
-bus_datum bus_data[NBUS];
+static bus_datum bus_data[NBUS];
/* the IO INT data, one entry per possible APIC INTerrupt */
-io_int io_apic_ints[NINTR];
+static io_int io_apic_ints[NINTR];
static int nintrs;
@@ -1984,12 +1984,13 @@ int smp_active = 0; /* are the APs allowed to run? */
SYSCTL_INT(_machdep, OID_AUTO, smp_active, CTLFLAG_RW, &smp_active, 0, "");
/* XXX maybe should be hw.ncpu */
-int smp_cpus = 1; /* how many cpu's running */
+static int smp_cpus = 1; /* how many cpu's running */
SYSCTL_INT(_machdep, OID_AUTO, smp_cpus, CTLFLAG_RD, &smp_cpus, 0, "");
int invltlb_ok = 0; /* throttle smp_invltlb() till safe */
SYSCTL_INT(_machdep, OID_AUTO, invltlb_ok, CTLFLAG_RW, &invltlb_ok, 0, "");
+/* Warning: Do not staticize. Used from swtch.s */
int do_page_zero_idle = 0; /* bzero pages for fun and profit in idleloop */
SYSCTL_INT(_machdep, OID_AUTO, do_page_zero_idle, CTLFLAG_RW,
&do_page_zero_idle, 0, "");
@@ -2092,6 +2093,7 @@ putfmtrr()
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
+/* Do not staticize. Used from apic_vector.s */
struct proc* checkstate_curproc[NCPU];
int checkstate_cpustate[NCPU];
u_long checkstate_pc[NCPU];
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index da85b08..0732bd1 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.107 1997/12/28 17:33:10 phk Exp $
+ * $Id: clock.c,v 1.108 1998/01/28 10:41:33 phk Exp $
*/
/*
@@ -132,7 +132,7 @@ u_int tsc_bias;
u_int tsc_comultiplier;
u_int tsc_freq;
u_int tsc_multiplier;
-u_int tsc_present;
+static u_int tsc_present;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
static int beeping = 0;
diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c
index 80ae7b8..4a593ea7 100644
--- a/sys/amd64/isa/intr_machdep.c
+++ b/sys/amd64/isa/intr_machdep.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.6 1997/08/30 08:08:04 fsmp Exp $
+ * $Id: intr_machdep.c,v 1.7 1997/09/28 15:48:34 mckay Exp $
*/
#include "opt_auto_eoi.h"
@@ -83,7 +83,7 @@
u_long *intr_countp[ICU_LEN];
inthand2_t *intr_handler[ICU_LEN];
u_int intr_mask[ICU_LEN];
-u_int* intr_mptr[ICU_LEN];
+static u_int* intr_mptr[ICU_LEN];
int intr_unit[ICU_LEN];
static inthand_t *fastintr[ICU_LEN] = {
diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c
index 80ae7b8..4a593ea7 100644
--- a/sys/amd64/isa/nmi.c
+++ b/sys/amd64/isa/nmi.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.6 1997/08/30 08:08:04 fsmp Exp $
+ * $Id: intr_machdep.c,v 1.7 1997/09/28 15:48:34 mckay Exp $
*/
#include "opt_auto_eoi.h"
@@ -83,7 +83,7 @@
u_long *intr_countp[ICU_LEN];
inthand2_t *intr_handler[ICU_LEN];
u_int intr_mask[ICU_LEN];
-u_int* intr_mptr[ICU_LEN];
+static u_int* intr_mptr[ICU_LEN];
int intr_unit[ICU_LEN];
static inthand_t *fastintr[ICU_LEN] = {
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index f2e0b0c..0f62f88 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id$
+ * $Id: db_command.c,v 1.23 1997/02/22 09:28:21 peter Exp $
*/
/*
@@ -53,7 +53,7 @@
* XXX when db_command is actually used, it will be generated by the linker.
* Then it should be declared extern.
*/
-struct linker_set db_cmd_set;
+static struct linker_set db_cmd_set;
boolean_t db_cmd_loop_done;
db_addr_t db_dot;
jmp_buf db_jmpbuf;
diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c
index 7f9e838..fa68862 100644
--- a/sys/dev/bktr/bktr_core.c
+++ b/sys/dev/bktr/bktr_core.c
@@ -4131,7 +4131,7 @@ checkDBX:
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-int nabcst[] = {
+static int nabcst[] = {
83, (int)( 45.75 * FREQFACTOR), 0,
14, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
7, (int)(175.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -4154,7 +4154,7 @@ int nabcst[] = {
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-int irccable[] = {
+static int irccable[] = {
99, (int)( 45.75 * FREQFACTOR), 0,
95, (int)( 91.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
23, (int)(217.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -4179,7 +4179,7 @@ int irccable[] = {
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-int hrccable[] = {
+static int hrccable[] = {
99, (int)( 45.75 * FREQFACTOR), 0,
95, (int)( 90.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
23, (int)(216.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -4308,12 +4308,12 @@ int hrccable[] = {
* 100 3890 000 IFFREQ
*
*/
-int weurope[] = {
+static int weurope[] = {
100, (int)( 38.90 * FREQFACTOR), 0,
90, (int)(231.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR),
80, (int)(105.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR),
74, (int)( 69.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR),
- 21, (int)(471.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR),
+ 21, (int)(471.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR),
17, (int)(183.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR),
16, (int)(175.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR),
15, (int)(82.25 * FREQFACTOR), (int)(8.50 * FREQFACTOR),
@@ -4337,7 +4337,7 @@ int weurope[] = {
*/
#define OFFSET 6.00
#define IF_FREQ 45.75
-int jpnbcst[] = {
+static int jpnbcst[] = {
62, (int)(IF_FREQ * FREQFACTOR), 0,
13, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
8, (int)(193.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -4362,7 +4362,7 @@ int jpnbcst[] = {
*/
#define OFFSET 6.00
#define IF_FREQ 45.75
-int jpncable[] = {
+static int jpncable[] = {
63, (int)(IF_FREQ * FREQFACTOR), 0,
23, (int)(223.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
22, (int)(165.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -4375,7 +4375,7 @@ int jpncable[] = {
#undef IF_FREQ
#undef OFFSET
-int* freqTable[] = {
+static int* freqTable[] = {
NULL,
nabcst,
irccable,
diff --git a/sys/dev/eisa/eisaconf.c b/sys/dev/eisa/eisaconf.c
index de62d63..02a1691 100644
--- a/sys/dev/eisa/eisaconf.c
+++ b/sys/dev/eisa/eisaconf.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: eisaconf.c,v 1.32 1997/10/28 15:58:08 bde Exp $
+ * $Id: eisaconf.c,v 1.33 1997/11/07 08:52:24 phk Exp $
*/
#include "opt_eisa.h"
@@ -77,8 +77,8 @@ DATA_SET (eisadriver_set, mainboard_drv);
/*
* Local function declarations and static variables
*/
-void eisa_reg_print __P((struct eisa_device *e_dev, char *string,
- char *separator));
+static void eisa_reg_print __P((struct eisa_device *e_dev,
+ char *string, char *separator));
static int eisa_add_resvaddr __P((struct eisa_device *e_dev,
struct resvlist *head, u_long base,
u_long size, int flags));
@@ -312,7 +312,7 @@ eisa_reg_start(e_dev)
* Output an optional character separator before the string
* if the line does not wrap.
*/
-void
+static void
eisa_reg_print(e_dev, string, separator)
struct eisa_device *e_dev;
char *string;
diff --git a/sys/dev/en/midway.c b/sys/dev/en/midway.c
index ac82b52..56b2ced 100644
--- a/sys/dev/en/midway.c
+++ b/sys/dev/en/midway.c
@@ -171,7 +171,7 @@
#define ENOTHER_RAW 0x04 /* 'raw' access (aka boodi mode) */
#define ENOTHER_SWSL 0x08 /* in software service list */
-int en_dma = EN_DMA; /* use DMA (switch off for dbg) */
+static int en_dma = EN_DMA; /* use DMA (switch off for dbg) */
/*
* autoconfig attachments
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index ef0a280..2e48cc9 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_fxp.c,v 1.46 1997/10/28 15:59:21 bde Exp $
+ * $Id: if_fxp.c,v 1.47 1998/01/08 23:42:29 eivind Exp $
*/
/*
@@ -176,7 +176,7 @@ struct fxp_supported_media {
const int fsm_defmedia; /* default media for this PHY */
};
-const int fxp_media_standard[] = {
+static const int fxp_media_standard[] = {
IFM_ETHER|IFM_10_T,
IFM_ETHER|IFM_10_T|IFM_FDX,
IFM_ETHER|IFM_100_TX,
@@ -185,12 +185,12 @@ const int fxp_media_standard[] = {
};
#define FXP_MEDIA_STANDARD_DEFMEDIA (IFM_ETHER|IFM_AUTO)
-const int fxp_media_default[] = {
+static const int fxp_media_default[] = {
IFM_ETHER|IFM_MANUAL, /* XXX IFM_AUTO ? */
};
#define FXP_MEDIA_DEFAULT_DEFMEDIA (IFM_ETHER|IFM_MANUAL)
-const struct fxp_supported_media fxp_media[] = {
+static const struct fxp_supported_media fxp_media[] = {
{ FXP_PHY_DP83840, fxp_media_standard,
sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]),
FXP_MEDIA_STANDARD_DEFMEDIA },
@@ -208,7 +208,7 @@ const struct fxp_supported_media fxp_media[] = {
static int fxp_mediachange __P((struct ifnet *));
static void fxp_mediastatus __P((struct ifnet *, struct ifmediareq *));
-void fxp_set_media __P((struct fxp_softc *, int));
+static void fxp_set_media __P((struct fxp_softc *, int));
static inline void fxp_scb_wait __P((struct fxp_softc *));
static FXP_INTR_TYPE fxp_intr __P((void *));
static void fxp_start __P((struct ifnet *));
@@ -223,7 +223,7 @@ static void fxp_mdi_write __P((struct fxp_softc *, int, int, int));
static void fxp_read_eeprom __P((struct fxp_softc *, u_int16_t *,
int, int));
static int fxp_attach_common __P((struct fxp_softc *, u_int8_t *));
-void fxp_stats_update __P((void *));
+static void fxp_stats_update __P((void *));
static void fxp_mc_setup __P((struct fxp_softc *));
/*
@@ -1044,7 +1044,7 @@ rcvloop:
* the DMA immediately, we don't wait - we just prepare to read
* them again next time.
*/
-void
+static void
fxp_stats_update(arg)
void *arg;
{
@@ -1361,7 +1361,7 @@ fxp_init(xsc)
sc->stat_ch = timeout(fxp_stats_update, sc, hz);
}
-void
+static void
fxp_set_media(sc, media)
struct fxp_softc *sc;
int media;
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index 5e2f30c..1eeb533 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -47,7 +47,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.48 1997/12/15 20:30:49 eivind Exp $
+ * $Id: if_ie.c,v 1.49 1998/01/08 23:40:56 eivind Exp $
*/
/*
@@ -165,7 +165,7 @@ iomem and and with 0xffff.
#define IED_RNR 0x04
#define IED_CNA 0x08
#define IED_READFRAME 0x10
-int ie_debug = IED_RNR;
+static int ie_debug = IED_RNR;
#endif
@@ -224,10 +224,10 @@ static int mc_setup(int, caddr_t, volatile struct ie_sys_ctl_block *);
static void ie_mc_reset(int unit);
#ifdef DEBUG
-void print_rbd(volatile struct ie_recv_buf_desc * rbd);
+static void print_rbd(volatile struct ie_recv_buf_desc * rbd);
-int in_ierint = 0;
-int in_ietint = 0;
+static int in_ierint = 0;
+static int in_ietint = 0;
#endif
@@ -2413,7 +2413,7 @@ setflag:
#ifdef DEBUG
-void
+static void
print_rbd(volatile struct ie_recv_buf_desc * rbd)
{
printf("RBD at %08lx:\n"
diff --git a/sys/dev/pdq/if_fpa.c b/sys/dev/pdq/if_fpa.c
index b0b38f0..e2e45ad 100644
--- a/sys/dev/pdq/if_fpa.c
+++ b/sys/dev/pdq/if_fpa.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_fpa.c,v 1.4 1997/08/02 14:33:10 bde Exp $
+ * $Id: if_fpa.c,v 1.5 1998/01/08 23:42:26 eivind Exp $
*
*/
@@ -213,7 +213,7 @@ pdq_pci_shutdown(
static u_long pdq_pci_count;
-struct pci_device fpadevice = {
+static struct pci_device fpadevice = {
"fpa",
pdq_pci_probe,
pdq_pci_attach,
diff --git a/sys/dev/ppbus/ppbconf.c b/sys/dev/ppbus/ppbconf.c
index 756550c..647676d 100644
--- a/sys/dev/ppbus/ppbconf.c
+++ b/sys/dev/ppbus/ppbconf.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ppbconf.c,v 1.3 1997/08/28 10:15:14 msmith Exp $
+ * $Id: ppbconf.c,v 1.4 1997/09/01 00:51:46 bde Exp $
*
*/
#include <sys/param.h>
@@ -37,7 +37,7 @@
#include <dev/ppbus/ppbconf.h>
#include <dev/ppbus/ppb_1284.h>
-LIST_HEAD(, ppb_data) ppbdata; /* list of existing ppbus */
+static LIST_HEAD(, ppb_data) ppbdata; /* list of existing ppbus */
/*
* Add a null driver so that the linker set always exists.
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index 9a578bd..53373b0 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -61,7 +61,7 @@
#define FALSE 0
#endif
-Byte_t RData[RDATASIZE] =
+static Byte_t RData[RDATASIZE] =
{
0x00, 0x09, 0xf6, 0x82,
0x02, 0x09, 0x86, 0xfb,
@@ -83,7 +83,7 @@ Byte_t RData[RDATASIZE] =
0x22, 0x09, 0x0a, 0x0a
};
-Byte_t RRegData[RREGDATASIZE]=
+static Byte_t RRegData[RREGDATASIZE]=
{
0x00, 0x09, 0xf6, 0x82, /* 00: Stop Rx processor */
0x08, 0x09, 0x8a, 0x13, /* 04: Tx software flow control */
@@ -100,7 +100,7 @@ Byte_t RRegData[RREGDATASIZE]=
0x22, 0x09, 0x0a, 0x0a /* 30: Rx FIFO Enable */
};
-CONTROLLER_T sController[CTL_SIZE] =
+static CONTROLLER_T sController[CTL_SIZE] =
{
{-1,-1,0,0,0,0,0,0,0,0,0,{0,0,0,0},{0,0,0,0},{-1,-1,-1,-1},{0,0,0,0}},
{-1,-1,0,0,0,0,0,0,0,0,0,{0,0,0,0},{0,0,0,0},{-1,-1,-1,-1},{0,0,0,0}},
@@ -116,12 +116,12 @@ Byte_t sIRQMap[16] =
};
#endif
-Byte_t sBitMapClrTbl[8] =
+static Byte_t sBitMapClrTbl[8] =
{
0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f
};
-Byte_t sBitMapSetTbl[8] =
+static Byte_t sBitMapSetTbl[8] =
{
0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80
};
@@ -772,7 +772,7 @@ static char* rp_pciprobe(pcici_t tag, pcidi_t type);
static void rp_pciattach(pcici_t tag, int unit);
static u_long rp_pcicount;
-struct pci_device rp_pcidevice = {
+static struct pci_device rp_pcidevice = {
"rp",
rp_pciprobe,
rp_pciattach,
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c
index 4b813ca..ca53452 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -4,7 +4,7 @@
* v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
* modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
*
- * $Id: spkr.c,v 1.30 1997/12/02 21:06:28 phk Exp $
+ * $Id: spkr.c,v 1.31 1998/01/24 02:54:25 eivind Exp $
*/
#include "speaker.h"
@@ -26,7 +26,7 @@
#ifdef DEVFS
#include <sys/devfsext.h>
-void *devfs_token;
+static void *devfs_token;
#endif
static d_open_t spkropen;
diff --git a/sys/dev/sr/if_sr_pci.c b/sys/dev/sr/if_sr_pci.c
index e122c81..02a32e0 100644
--- a/sys/dev/sr/if_sr_pci.c
+++ b/sys/dev/sr/if_sr_pci.c
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_sr_p.c,v 1.4 1997/02/22 09:44:07 peter Exp $
+ * $Id: if_sr_p.c,v 1.5 1997/09/02 20:06:27 bde Exp $
*/
#include "pci.h"
@@ -59,7 +59,7 @@ static void sr_pci_attach(pcici_t config_id, int unit);
static u_long src_count = NSR;
-struct pci_device sr_pci_driver =
+static struct pci_device sr_pci_driver =
{
"src",
sr_pci_probe,
diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c
index cd32ac3..71a9e7df 100644
--- a/sys/dev/tx/if_tx.c
+++ b/sys/dev/tx/if_tx.c
@@ -100,7 +100,7 @@
*/
static u_long epic_pci_count;
static epic_softc_t * epics[EPIC_MAX_DEVICES];
-struct pci_device txdevice = {
+static struct pci_device txdevice = {
"tx",
epic_pci_probe,
epic_pci_attach,
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c
index 82bb632..fb921d9 100644
--- a/sys/dev/vn/vn.c
+++ b/sys/dev/vn/vn.c
@@ -38,7 +38,7 @@
* from: Utah Hdr: vn.c 1.13 94/04/02
*
* from: @(#)vn.c 8.6 (Berkeley) 4/1/94
- * $Id: vn.c,v 1.52 1997/12/06 14:27:08 bde Exp $
+ * $Id: vn.c,v 1.53 1998/01/24 02:54:05 eivind Exp $
*/
/*
@@ -108,8 +108,8 @@ static struct bdevsw vn_bdevsw =
#ifdef DEBUG
-int dovncluster = 1;
-int vndebug = 0x00;
+static int dovncluster = 1;
+static int vndebug = 0x00;
#define VDB_FOLLOW 0x01
#define VDB_INIT 0x02
#define VDB_IO 0x04
diff --git a/sys/dev/vx/if_vx_eisa.c b/sys/dev/vx/if_vx_eisa.c
index 8002b16..68fca3f 100644
--- a/sys/dev/vx/if_vx_eisa.c
+++ b/sys/dev/vx/if_vx_eisa.c
@@ -73,7 +73,7 @@ static const char *vx_match __P((eisa_id_t type));
static int vx_eisa_probe __P((void));
static int vx_eisa_attach __P((struct eisa_device *));
-struct eisa_driver vx_eisa_driver = {
+static struct eisa_driver vx_eisa_driver = {
"vx",
vx_eisa_probe,
vx_eisa_attach,
diff --git a/sys/fs/cd9660/cd9660_node.c b/sys/fs/cd9660/cd9660_node.c
index 7220d1e..a7a971b 100644
--- a/sys/fs/cd9660/cd9660_node.c
+++ b/sys/fs/cd9660/cd9660_node.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94
- * $Id: cd9660_node.c,v 1.23 1998/02/04 22:32:29 eivind Exp $
+ * $Id: cd9660_node.c,v 1.24 1998/02/06 12:13:20 eivind Exp $
*/
#include <sys/param.h>
@@ -55,10 +55,10 @@
/*
* Structures associated with iso_node caching.
*/
-struct iso_node **isohashtbl;
-u_long isohash;
+static struct iso_node **isohashtbl;
+static u_long isohash;
#define INOHASH(device, inum) (((device) + ((inum)>>12)) & isohash)
-struct simplelock cd9660_ihash_slock;
+static struct simplelock cd9660_ihash_slock;
static void cd9660_ihashrem __P((struct iso_node *));
static unsigned cd9660_chars2ui __P((unsigned char *begin, int len));
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index 3324a4a..2cbe479 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.32 1997/10/26 20:55:14 phk Exp $
+ * $Id: fdesc_vnops.c,v 1.33 1997/10/27 13:33:38 bde Exp $
*/
/*
@@ -77,8 +77,8 @@ FD_STDIN, FD_STDOUT, FD_STDERR must be a sequence n, n+1, n+2
#define NFDCACHE 4
#define FD_NHASH(ix) \
(&fdhashtbl[(ix) & fdhash])
-LIST_HEAD(fdhashhead, fdescnode) *fdhashtbl;
-u_long fdhash;
+static LIST_HEAD(fdhashhead, fdescnode) *fdhashtbl;
+static u_long fdhash;
static int fdesc_attr __P((int fd, struct vattr *vap, struct ucred *cred,
struct proc *p));
diff --git a/sys/fs/msdosfs/msdosfs_conv.c b/sys/fs/msdosfs/msdosfs_conv.c
index e35f52b..59f4d2c 100644
--- a/sys/fs/msdosfs/msdosfs_conv.c
+++ b/sys/fs/msdosfs/msdosfs_conv.c
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: msdosfs_conv.c,v 1.13 1997/02/22 09:40:46 peter Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.6.2.1 1994/08/30 02:27:57 cgd Exp $ */
/*
@@ -51,10 +51,10 @@ static u_short leapyear[] = {
* Variables used to remember parts of the last time conversion. Maybe we
* can avoid a full conversion.
*/
-u_long lasttime;
-u_long lastday;
-u_short lastddate;
-u_short lastdtime;
+static u_long lasttime;
+static u_long lastday;
+static u_short lastddate;
+static u_short lastdtime;
/*
* Convert the unix version of time to dos's idea of time to be used in
@@ -127,8 +127,8 @@ unix2dostime(tsp, ddp, dtp)
*/
#define SECONDSTO1980 (((8 * 365) + (2 * 366)) * (24 * 60 * 60))
-u_short lastdosdate;
-u_long lastseconds;
+static u_short lastdosdate;
+static u_long lastseconds;
/*
* Convert from dos' idea of time to unix'. This will probably only be
diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c
index 4b961f5..81e0699 100644
--- a/sys/fs/msdosfs/msdosfs_denode.c
+++ b/sys/fs/msdosfs/msdosfs_denode.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_denode.c,v 1.29 1998/02/04 22:33:00 eivind Exp $ */
+/* $Id: msdosfs_denode.c,v 1.30 1998/02/06 12:13:46 eivind Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */
/*-
@@ -68,8 +68,8 @@
static MALLOC_DEFINE(M_MSDOSFSNODE, "MSDOSFS node", "MSDOSFS vnode private part");
-struct denode **dehashtbl;
-u_long dehash; /* size of hash table - 1 */
+static struct denode **dehashtbl;
+static u_long dehash; /* size of hash table - 1 */
#define DEHASH(dev, deno) (dehashtbl[((dev) + (deno)) & dehash])
static struct simplelock dehash_slock;
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c
index f3c2f5f..bb25ec2 100644
--- a/sys/fs/msdosfs/msdosfs_fat.c
+++ b/sys/fs/msdosfs/msdosfs_fat.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_fat.c,v 1.14 1998/02/04 22:33:00 eivind Exp $ */
+/* $Id: msdosfs_fat.c,v 1.15 1998/02/06 12:13:46 eivind Exp $ */
/* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */
/*-
@@ -69,15 +69,15 @@
/*
* Fat cache stats.
*/
-int fc_fileextends; /* # of file extends */
-int fc_lfcempty; /* # of time last file cluster cache entry
+static int fc_fileextends; /* # of file extends */
+static int fc_lfcempty; /* # of time last file cluster cache entry
* was empty */
-int fc_bmapcalls; /* # of times pcbmap was called */
+static int fc_bmapcalls; /* # of times pcbmap was called */
#define LMMAX 20
-int fc_lmdistance[LMMAX]; /* counters for how far off the last
+static int fc_lmdistance[LMMAX];/* counters for how far off the last
* cluster mapped entry was. */
-int fc_largedistance; /* off by more than LMMAX */
+static int fc_largedistance; /* off by more than LMMAX */
/* Byte offset in FAT on filesystem pmp, cluster cn */
#define FATOFS(pmp, cn) (FAT12(pmp) ? (cn) * 3 / 2 : (cn) * 2)
diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c
index de64494..7244d05 100644
--- a/sys/fs/nullfs/null_subr.c
+++ b/sys/fs/nullfs/null_subr.c
@@ -35,7 +35,7 @@
*
* @(#)null_subr.c 8.7 (Berkeley) 5/14/95
*
- * $Id: null_subr.c,v 1.15 1998/02/04 22:32:46 eivind Exp $
+ * $Id: null_subr.c,v 1.16 1998/02/06 12:13:36 eivind Exp $
*/
#include "opt_debug_nullfs.h"
@@ -61,8 +61,8 @@
#define NULL_NHASH(vp) \
(&null_node_hashtbl[(((u_long)vp)>>LOG2_SIZEVNODE) & null_node_hash])
-LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl;
-u_long null_node_hash;
+static LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl;
+static u_long null_node_hash;
static int null_node_alloc __P((struct mount *mp, struct vnode *lowervp,
struct vnode **vpp));
diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c
index 932b6c1..a346ae7 100644
--- a/sys/fs/procfs/procfs_vnops.c
+++ b/sys/fs/procfs/procfs_vnops.c
@@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
*
- * $Id: procfs_vnops.c,v 1.53 1998/02/04 22:32:49 eivind Exp $
+ * $Id: procfs_vnops.c,v 1.54 1998/02/06 12:13:42 eivind Exp $
*/
/*
@@ -80,7 +80,7 @@ static int procfs_setattr __P((struct vop_setattr_args *));
* process-specific sub-directories. It is
* used in procfs_lookup and procfs_readdir
*/
-struct proc_target {
+static struct proc_target {
u_char pt_type;
u_char pt_namlen;
char *pt_name;
diff --git a/sys/fs/umapfs/umap_subr.c b/sys/fs/umapfs/umap_subr.c
index 549d3e4..dd93078 100644
--- a/sys/fs/umapfs/umap_subr.c
+++ b/sys/fs/umapfs/umap_subr.c
@@ -35,7 +35,7 @@
*
* @(#)umap_subr.c 8.9 (Berkeley) 5/14/95
*
- * $Id: umap_subr.c,v 1.11 1997/08/02 14:32:24 bde Exp $
+ * $Id: umap_subr.c,v 1.12 1998/02/07 01:36:24 kato Exp $
*/
#include <sys/param.h>
@@ -59,8 +59,8 @@
#define UMAP_NHASH(vp) \
(&umap_node_hashtbl[(((u_long)vp)>>LOG2_SIZEVNODE) & umap_node_hash])
-LIST_HEAD(umap_node_hashhead, umap_node) *umap_node_hashtbl;
-u_long umap_node_hash;
+static LIST_HEAD(umap_node_hashhead, umap_node) *umap_node_hashtbl;
+static u_long umap_node_hash;
static u_long umap_findid __P((u_long id, u_long map[][2], int nentries));
static int umap_node_alloc __P((struct mount *mp, struct vnode *lowervp,
diff --git a/sys/gnu/ext2fs/ext2_ihash.c b/sys/gnu/ext2fs/ext2_ihash.c
index 56be3fd..a51ff4e 100644
--- a/sys/gnu/ext2fs/ext2_ihash.c
+++ b/sys/gnu/ext2fs/ext2_ihash.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95
- * $Id: ufs_ihash.c,v 1.14 1998/02/04 22:33:35 eivind Exp $
+ * $Id: ufs_ihash.c,v 1.15 1998/02/06 12:14:17 eivind Exp $
*/
#include <sys/param.h>
@@ -49,10 +49,10 @@ static MALLOC_DEFINE(M_UFSIHASH, "UFS ihash", "UFS Inode hash tables");
/*
* Structures associated with inode cacheing.
*/
-LIST_HEAD(ihashhead, inode) *ihashtbl;
-u_long ihash; /* size of hash table - 1 */
+static LIST_HEAD(ihashhead, inode) *ihashtbl;
+static u_long ihash; /* size of hash table - 1 */
#define INOHASH(device, inum) (&ihashtbl[((device) + (inum)) & ihash])
-struct simplelock ufs_ihash_slock;
+static struct simplelock ufs_ihash_slock;
/*
* Initialize inode hash table.
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c
index 1f5e239..58e75b8 100644
--- a/sys/i386/apm/apm.c
+++ b/sys/i386/apm/apm.c
@@ -15,7 +15,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.67 1997/12/23 16:32:35 nate Exp $
+ * $Id: apm.c,v 1.68 1998/01/24 02:54:08 eivind Exp $
*/
#include "opt_devfs.h"
@@ -103,7 +103,7 @@ setup_apm_gdt(u_int code32_base, u_int code16_base, u_int data_base, u_int code_
ssdtosd(gdt_segs + GAPMDATA_SEL , &gdt[GAPMDATA_SEL ].sd);
}
-/* 48bit far pointer */
+/* 48bit far pointer. Do not staticize - used from apm_setup.s */
struct addr48 {
u_long offset;
u_short segment;
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c
index 1f5e239..58e75b8 100644
--- a/sys/i386/bios/apm.c
+++ b/sys/i386/bios/apm.c
@@ -15,7 +15,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.67 1997/12/23 16:32:35 nate Exp $
+ * $Id: apm.c,v 1.68 1998/01/24 02:54:08 eivind Exp $
*/
#include "opt_devfs.h"
@@ -103,7 +103,7 @@ setup_apm_gdt(u_int code32_base, u_int code16_base, u_int data_base, u_int code_
ssdtosd(gdt_segs + GAPMDATA_SEL , &gdt[GAPMDATA_SEL ].sd);
}
-/* 48bit far pointer */
+/* 48bit far pointer. Do not staticize - used from apm_setup.s */
struct addr48 {
u_long offset;
u_short segment;
diff --git a/sys/i386/eisa/eisaconf.c b/sys/i386/eisa/eisaconf.c
index de62d63..02a1691 100644
--- a/sys/i386/eisa/eisaconf.c
+++ b/sys/i386/eisa/eisaconf.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: eisaconf.c,v 1.32 1997/10/28 15:58:08 bde Exp $
+ * $Id: eisaconf.c,v 1.33 1997/11/07 08:52:24 phk Exp $
*/
#include "opt_eisa.h"
@@ -77,8 +77,8 @@ DATA_SET (eisadriver_set, mainboard_drv);
/*
* Local function declarations and static variables
*/
-void eisa_reg_print __P((struct eisa_device *e_dev, char *string,
- char *separator));
+static void eisa_reg_print __P((struct eisa_device *e_dev,
+ char *string, char *separator));
static int eisa_add_resvaddr __P((struct eisa_device *e_dev,
struct resvlist *head, u_long base,
u_long size, int flags));
@@ -312,7 +312,7 @@ eisa_reg_start(e_dev)
* Output an optional character separator before the string
* if the line does not wrap.
*/
-void
+static void
eisa_reg_print(e_dev, string, separator)
struct eisa_device *e_dev;
char *string;
diff --git a/sys/i386/eisa/if_vx_eisa.c b/sys/i386/eisa/if_vx_eisa.c
index 8002b16..68fca3f 100644
--- a/sys/i386/eisa/if_vx_eisa.c
+++ b/sys/i386/eisa/if_vx_eisa.c
@@ -73,7 +73,7 @@ static const char *vx_match __P((eisa_id_t type));
static int vx_eisa_probe __P((void));
static int vx_eisa_attach __P((struct eisa_device *));
-struct eisa_driver vx_eisa_driver = {
+static struct eisa_driver vx_eisa_driver = {
"vx",
vx_eisa_probe,
vx_eisa_attach,
diff --git a/sys/i386/i386/bios.c b/sys/i386/i386/bios.c
index b28deb3..88e6103 100644
--- a/sys/i386/i386/bios.c
+++ b/sys/i386/i386/bios.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bios.c,v 1.8 1997/11/07 08:52:26 phk Exp $
+ * $Id: bios.c,v 1.9 1998/01/01 13:26:55 msmith Exp $
*/
/*
@@ -43,9 +43,9 @@
#define BIOS_SIZE 0x20000
/* exported lookup results */
-struct bios32_SDentry PCIbios = {entry : 0};
-struct SMBIOS_table *SMBIOStable = 0;
-struct DMI_table *DMItable = 0;
+struct bios32_SDentry PCIbios = {entry : 0};
+static struct SMBIOS_table *SMBIOStable = 0;
+static struct DMI_table *DMItable = 0;
static caddr_t bios32_SDCI = NULL;
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index 7397775..0b5a162 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.63 1997/12/15 01:14:10 tegge Exp $
+ * $Id: mp_machdep.c,v 1.64 1997/12/15 02:18:20 tegge Exp $
*/
#include "opt_smp.h"
@@ -265,7 +265,7 @@ static struct {
/* Bitmap of all available CPUs */
u_int all_cpus;
-/* AP uses this PTD during bootstrap */
+/* AP uses this PTD during bootstrap. Do not staticize. */
pd_entry_t *bootPTD;
/* Hotwire a 0->4MB V==P mapping */
@@ -689,10 +689,10 @@ static int default_data[7][5] =
/* the bus data */
-bus_datum bus_data[NBUS];
+static bus_datum bus_data[NBUS];
/* the IO INT data, one entry per possible APIC INTerrupt */
-io_int io_apic_ints[NINTR];
+static io_int io_apic_ints[NINTR];
static int nintrs;
@@ -1984,12 +1984,13 @@ int smp_active = 0; /* are the APs allowed to run? */
SYSCTL_INT(_machdep, OID_AUTO, smp_active, CTLFLAG_RW, &smp_active, 0, "");
/* XXX maybe should be hw.ncpu */
-int smp_cpus = 1; /* how many cpu's running */
+static int smp_cpus = 1; /* how many cpu's running */
SYSCTL_INT(_machdep, OID_AUTO, smp_cpus, CTLFLAG_RD, &smp_cpus, 0, "");
int invltlb_ok = 0; /* throttle smp_invltlb() till safe */
SYSCTL_INT(_machdep, OID_AUTO, invltlb_ok, CTLFLAG_RW, &invltlb_ok, 0, "");
+/* Warning: Do not staticize. Used from swtch.s */
int do_page_zero_idle = 0; /* bzero pages for fun and profit in idleloop */
SYSCTL_INT(_machdep, OID_AUTO, do_page_zero_idle, CTLFLAG_RW,
&do_page_zero_idle, 0, "");
@@ -2092,6 +2093,7 @@ putfmtrr()
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
+/* Do not staticize. Used from apic_vector.s */
struct proc* checkstate_curproc[NCPU];
int checkstate_cpustate[NCPU];
u_long checkstate_pc[NCPU];
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index 7397775..0b5a162 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.63 1997/12/15 01:14:10 tegge Exp $
+ * $Id: mp_machdep.c,v 1.64 1997/12/15 02:18:20 tegge Exp $
*/
#include "opt_smp.h"
@@ -265,7 +265,7 @@ static struct {
/* Bitmap of all available CPUs */
u_int all_cpus;
-/* AP uses this PTD during bootstrap */
+/* AP uses this PTD during bootstrap. Do not staticize. */
pd_entry_t *bootPTD;
/* Hotwire a 0->4MB V==P mapping */
@@ -689,10 +689,10 @@ static int default_data[7][5] =
/* the bus data */
-bus_datum bus_data[NBUS];
+static bus_datum bus_data[NBUS];
/* the IO INT data, one entry per possible APIC INTerrupt */
-io_int io_apic_ints[NINTR];
+static io_int io_apic_ints[NINTR];
static int nintrs;
@@ -1984,12 +1984,13 @@ int smp_active = 0; /* are the APs allowed to run? */
SYSCTL_INT(_machdep, OID_AUTO, smp_active, CTLFLAG_RW, &smp_active, 0, "");
/* XXX maybe should be hw.ncpu */
-int smp_cpus = 1; /* how many cpu's running */
+static int smp_cpus = 1; /* how many cpu's running */
SYSCTL_INT(_machdep, OID_AUTO, smp_cpus, CTLFLAG_RD, &smp_cpus, 0, "");
int invltlb_ok = 0; /* throttle smp_invltlb() till safe */
SYSCTL_INT(_machdep, OID_AUTO, invltlb_ok, CTLFLAG_RW, &invltlb_ok, 0, "");
+/* Warning: Do not staticize. Used from swtch.s */
int do_page_zero_idle = 0; /* bzero pages for fun and profit in idleloop */
SYSCTL_INT(_machdep, OID_AUTO, do_page_zero_idle, CTLFLAG_RW,
&do_page_zero_idle, 0, "");
@@ -2092,6 +2093,7 @@ putfmtrr()
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
+/* Do not staticize. Used from apic_vector.s */
struct proc* checkstate_curproc[NCPU];
int checkstate_cpustate[NCPU];
u_long checkstate_pc[NCPU];
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 0a2024d..73ea393 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.182 1998/02/05 03:31:42 dyson Exp $
+ * $Id: pmap.c,v 1.183 1998/02/06 12:13:09 eivind Exp $
*/
/*
@@ -152,22 +152,22 @@ vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */
vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */
static boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */
static vm_offset_t vm_first_phys;
-int pgeflag; /* PG_G or-in */
-int pseflag; /* PG_PS or-in */
-int pv_npg;
+static int pgeflag; /* PG_G or-in */
+static int pseflag; /* PG_PS or-in */
+static int pv_npg;
-int nkpt;
+static int nkpt;
vm_offset_t kernel_vm_end;
/*
* Data for the pv entry allocation mechanism
*/
-vm_zone_t pvzone;
-struct vm_zone pvzone_store;
-struct vm_object pvzone_obj;
-int pv_entry_count=0, pv_entry_max=0, pv_entry_high_water=0;
-int pmap_pagedaemon_waken = 0;
-struct pv_entry *pvinit;
+static vm_zone_t pvzone;
+static struct vm_zone pvzone_store;
+static struct vm_object pvzone_obj;
+static int pv_entry_count=0, pv_entry_max=0, pv_entry_high_water=0;
+static int pmap_pagedaemon_waken = 0;
+static struct pv_entry *pvinit;
/*
* All those kernel PT submaps that BSD is so fond of
@@ -187,8 +187,8 @@ extern pd_entry_t *IdlePTDS[];
extern pt_entry_t SMP_prvpt[];
#endif
-pt_entry_t *PMAP1 = 0;
-unsigned *PADDR1 = 0;
+static pt_entry_t *PMAP1 = 0;
+static unsigned *PADDR1 = 0;
static PMAP_INLINE void free_pv_entry __P((pv_entry_t pv));
static unsigned * get_ptbase __P((pmap_t pmap));
@@ -219,7 +219,7 @@ static int pmap_unuse_pt __P((pmap_t, vm_offset_t, vm_page_t));
vm_offset_t pmap_kmem_choose(vm_offset_t addr) ;
void pmap_collect(void);
-unsigned pdir4mb;
+static unsigned pdir4mb;
/*
* Routine: pmap_pte
@@ -252,7 +252,7 @@ pmap_pte(pmap, va)
* by using a large (4MB) page for much of the kernel
* (.text, .data, .bss)
*/
-vm_offset_t
+static vm_offset_t
pmap_kmem_choose(vm_offset_t addr) {
vm_offset_t newaddr = addr;
#ifndef DISABLE_PSE
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index 435e451..d3fae02 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
- * $Id: sys_machdep.c,v 1.30 1997/11/26 22:45:47 joerg Exp $
+ * $Id: sys_machdep.c,v 1.31 1997/12/27 03:00:59 peter Exp $
*
*/
@@ -253,7 +253,7 @@ done:
#ifdef USER_LDT
/*
* Update the GDT entry pointing to the LDT to point to the LDT of the
- * current process.
+ * current process. Do not staticize.
*/
void
set_user_ldt(struct pcb *pcb)
diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c
index da85b08..0732bd1 100644
--- a/sys/i386/i386/tsc.c
+++ b/sys/i386/i386/tsc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.107 1997/12/28 17:33:10 phk Exp $
+ * $Id: clock.c,v 1.108 1998/01/28 10:41:33 phk Exp $
*/
/*
@@ -132,7 +132,7 @@ u_int tsc_bias;
u_int tsc_comultiplier;
u_int tsc_freq;
u_int tsc_multiplier;
-u_int tsc_present;
+static u_int tsc_present;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
static int beeping = 0;
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c
index b69dec9..ad5521d 100644
--- a/sys/i386/ibcs2/imgact_coff.c
+++ b/sys/i386/ibcs2/imgact_coff.c
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: imgact_coff.c,v 1.27 1997/09/21 04:22:29 dyson Exp $
+ * $Id: imgact_coff.c,v 1.28 1997/12/27 02:56:18 bde Exp $
*/
#include <sys/param.h>
@@ -53,8 +53,8 @@
extern struct sysentvec ibcs2_svr3_sysvec;
-extern int coff_load_file __P((struct proc *p, char *name));
-extern int exec_coff_imgact __P((struct image_params *imgp));
+static int coff_load_file __P((struct proc *p, char *name));
+static int exec_coff_imgact __P((struct image_params *imgp));
static int load_coff_section __P((struct vmspace *vmspace, struct vnode *vp, vm_offset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot));
@@ -148,7 +148,7 @@ load_coff_section(struct vmspace *vmspace, struct vnode *vp, vm_offset_t offset,
return error;
}
-int
+static int
coff_load_file(struct proc *p, char *name)
{
struct vmspace *vmspace = p->p_vmspace;
@@ -283,7 +283,7 @@ coff_load_file(struct proc *p, char *name)
return error;
}
-int
+static int
exec_coff_imgact(imgp)
struct image_params *imgp;
{
@@ -475,5 +475,5 @@ exec_coff_imgact(imgp)
* Since `const' objects end up in the text segment, TEXT_SET is the
* correct directive to use.
*/
-const struct execsw coff_execsw = { exec_coff_imgact, "coff" };
+static const struct execsw coff_execsw = { exec_coff_imgact, "coff" };
TEXT_SET(execsw_set, coff_execsw);
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 7397775..0b5a162 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.63 1997/12/15 01:14:10 tegge Exp $
+ * $Id: mp_machdep.c,v 1.64 1997/12/15 02:18:20 tegge Exp $
*/
#include "opt_smp.h"
@@ -265,7 +265,7 @@ static struct {
/* Bitmap of all available CPUs */
u_int all_cpus;
-/* AP uses this PTD during bootstrap */
+/* AP uses this PTD during bootstrap. Do not staticize. */
pd_entry_t *bootPTD;
/* Hotwire a 0->4MB V==P mapping */
@@ -689,10 +689,10 @@ static int default_data[7][5] =
/* the bus data */
-bus_datum bus_data[NBUS];
+static bus_datum bus_data[NBUS];
/* the IO INT data, one entry per possible APIC INTerrupt */
-io_int io_apic_ints[NINTR];
+static io_int io_apic_ints[NINTR];
static int nintrs;
@@ -1984,12 +1984,13 @@ int smp_active = 0; /* are the APs allowed to run? */
SYSCTL_INT(_machdep, OID_AUTO, smp_active, CTLFLAG_RW, &smp_active, 0, "");
/* XXX maybe should be hw.ncpu */
-int smp_cpus = 1; /* how many cpu's running */
+static int smp_cpus = 1; /* how many cpu's running */
SYSCTL_INT(_machdep, OID_AUTO, smp_cpus, CTLFLAG_RD, &smp_cpus, 0, "");
int invltlb_ok = 0; /* throttle smp_invltlb() till safe */
SYSCTL_INT(_machdep, OID_AUTO, invltlb_ok, CTLFLAG_RW, &invltlb_ok, 0, "");
+/* Warning: Do not staticize. Used from swtch.s */
int do_page_zero_idle = 0; /* bzero pages for fun and profit in idleloop */
SYSCTL_INT(_machdep, OID_AUTO, do_page_zero_idle, CTLFLAG_RW,
&do_page_zero_idle, 0, "");
@@ -2092,6 +2093,7 @@ putfmtrr()
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
+/* Do not staticize. Used from apic_vector.s */
struct proc* checkstate_curproc[NCPU];
int checkstate_cpustate[NCPU];
u_long checkstate_pc[NCPU];
diff --git a/sys/i386/isa/aic6360.c b/sys/i386/isa/aic6360.c
index 67cfb97..9424b5c 100644
--- a/sys/i386/isa/aic6360.c
+++ b/sys/i386/isa/aic6360.c
@@ -31,7 +31,7 @@
*/
/*
- * $Id: aic6360.c,v 1.35 1997/10/26 21:08:39 nate Exp $
+ * $Id: aic6360.c,v 1.36 1997/11/20 15:48:23 nate Exp $
*
* Acknowledgements: Many of the algorithms used in this driver are
* inspired by the work of Julian Elischer (julian@tfs.com) and
@@ -706,7 +706,7 @@ static struct scsi_device aic_dev = {
#include <pccard/slot.h>
static int aicinit(struct pccard_devinfo *); /* init device */
-void aicunload(struct pccard_devinfo *); /* Disable driver */
+static void aicunload(struct pccard_devinfo *); /* Disable driver */
static int aic_card_intr(struct pccard_devinfo *); /* Interrupt handler */
static struct pccard_device aic_info = {
@@ -759,7 +759,7 @@ aicinit(struct pccard_devinfo *devi)
* and ensure that any driver entry points such as
* read and write do not hang.
*/
-void
+static void
aicunload(struct pccard_devinfo *devi)
{
printf("aic%d: unload\n", devi->isahd.id_unit);
diff --git a/sys/i386/isa/atapi.c b/sys/i386/isa/atapi.c
index 09439cb..588bb3d 100644
--- a/sys/i386/isa/atapi.c
+++ b/sys/i386/isa/atapi.c
@@ -160,7 +160,7 @@ int atapi_attach (int ctlr, int unit, int port)
#define PHASE_COMPLETED (ARI_IN | ARI_CMD)
#define PHASE_ABORTED 0 /* nonstandard - for NEC 260 */
-struct atapi atapitab[NWDC];
+static struct atapi atapitab[NWDC];
static struct atapi_params *atapi_probe (int port, int unit);
static int atapi_wait (int port, u_char bits_wanted);
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index da85b08..0732bd1 100644
--- a/sys/i386/isa/clock.c
+++ b/sys/i386/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.107 1997/12/28 17:33:10 phk Exp $
+ * $Id: clock.c,v 1.108 1998/01/28 10:41:33 phk Exp $
*/
/*
@@ -132,7 +132,7 @@ u_int tsc_bias;
u_int tsc_comultiplier;
u_int tsc_freq;
u_int tsc_multiplier;
-u_int tsc_present;
+static u_int tsc_present;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
static int beeping = 0;
diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c
index 5e2f30c..1eeb533 100644
--- a/sys/i386/isa/if_ie.c
+++ b/sys/i386/isa/if_ie.c
@@ -47,7 +47,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.48 1997/12/15 20:30:49 eivind Exp $
+ * $Id: if_ie.c,v 1.49 1998/01/08 23:40:56 eivind Exp $
*/
/*
@@ -165,7 +165,7 @@ iomem and and with 0xffff.
#define IED_RNR 0x04
#define IED_CNA 0x08
#define IED_READFRAME 0x10
-int ie_debug = IED_RNR;
+static int ie_debug = IED_RNR;
#endif
@@ -224,10 +224,10 @@ static int mc_setup(int, caddr_t, volatile struct ie_sys_ctl_block *);
static void ie_mc_reset(int unit);
#ifdef DEBUG
-void print_rbd(volatile struct ie_recv_buf_desc * rbd);
+static void print_rbd(volatile struct ie_recv_buf_desc * rbd);
-int in_ierint = 0;
-int in_ietint = 0;
+static int in_ierint = 0;
+static int in_ietint = 0;
#endif
@@ -2413,7 +2413,7 @@ setflag:
#ifdef DEBUG
-void
+static void
print_rbd(volatile struct ie_recv_buf_desc * rbd)
{
printf("RBD at %08lx:\n"
diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c
index 80ae7b8..4a593ea7 100644
--- a/sys/i386/isa/intr_machdep.c
+++ b/sys/i386/isa/intr_machdep.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.6 1997/08/30 08:08:04 fsmp Exp $
+ * $Id: intr_machdep.c,v 1.7 1997/09/28 15:48:34 mckay Exp $
*/
#include "opt_auto_eoi.h"
@@ -83,7 +83,7 @@
u_long *intr_countp[ICU_LEN];
inthand2_t *intr_handler[ICU_LEN];
u_int intr_mask[ICU_LEN];
-u_int* intr_mptr[ICU_LEN];
+static u_int* intr_mptr[ICU_LEN];
int intr_unit[ICU_LEN];
static inthand_t *fastintr[ICU_LEN] = {
diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c
index 2c47749..e74ec01 100644
--- a/sys/i386/isa/istallion.c
+++ b/sys/i386/isa/istallion.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: istallion.c,v 1.14 1997/12/06 13:22:33 bde Exp $
+ * $Id: istallion.c,v 1.15 1997/12/16 17:40:00 eivind Exp $
*/
/*****************************************************************************/
@@ -520,8 +520,8 @@ static char *stli_brdnames[] = {
* Declare all those functions in this driver! First up is the set of
* externally visible functions.
*/
-int stliprobe(struct isa_device *idp);
-int stliattach(struct isa_device *idp);
+static int stliprobe(struct isa_device *idp);
+static int stliattach(struct isa_device *idp);
STATIC d_open_t stliopen;
STATIC d_close_t stliclose;
@@ -816,7 +816,7 @@ static int stli_mcaprobe(struct isa_device *idp)
* shared memory region to see if the board is really there or not...
*/
-int stliprobe(struct isa_device *idp)
+static int stliprobe(struct isa_device *idp)
{
stlibrd_t *brdp;
int btype, bclass;
@@ -904,7 +904,7 @@ int stliprobe(struct isa_device *idp)
* Allocate resources for and initialize a board.
*/
-int stliattach(struct isa_device *idp)
+static int stliattach(struct isa_device *idp)
{
stlibrd_t *brdp;
int brdnr;
diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c
index 80ae7b8..4a593ea7 100644
--- a/sys/i386/isa/nmi.c
+++ b/sys/i386/isa/nmi.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.6 1997/08/30 08:08:04 fsmp Exp $
+ * $Id: intr_machdep.c,v 1.7 1997/09/28 15:48:34 mckay Exp $
*/
#include "opt_auto_eoi.h"
@@ -83,7 +83,7 @@
u_long *intr_countp[ICU_LEN];
inthand2_t *intr_handler[ICU_LEN];
u_int intr_mask[ICU_LEN];
-u_int* intr_mptr[ICU_LEN];
+static u_int* intr_mptr[ICU_LEN];
int intr_unit[ICU_LEN];
static inthand_t *fastintr[ICU_LEN] = {
diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c
index 3411292..c589b0d 100644
--- a/sys/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/i386/isa/pcvt/pcvt_drv.c
@@ -104,7 +104,7 @@ extern int getchar __P((void));
extern u_short *Crtat;
#endif /* PCVT_NETBSD */
-unsigned __debug = 0; /*0xffe */
+static unsigned __debug = 0; /*0xffe */
static __color;
static nrow;
@@ -780,7 +780,7 @@ pcmmap(Dev_t dev, int offset, int nprot)
#if PCVT_KBD_FIFO
u_char pcvt_kbd_fifo[PCVT_KBD_FIFO_SZ];
-int pcvt_kbd_wptr = 0;
+static int pcvt_kbd_wptr = 0;
int pcvt_kbd_rptr = 0;
short pcvt_kbd_count= 0;
static u_char pcvt_timeout_scheduled = 0;
diff --git a/sys/i386/isa/pnp.c b/sys/i386/isa/pnp.c
index 3d4b4f1..3bc63ed 100644
--- a/sys/i386/isa/pnp.c
+++ b/sys/i386/isa/pnp.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pnp.c,v 1.3 1997/09/19 15:20:24 jmg Exp $
+ * $Id: pnp.c,v 1.4 1997/11/18 11:45:26 bde Exp $
*/
#include <sys/param.h>
@@ -38,7 +38,7 @@
#include <i386/isa/isa_device.h>
#include <i386/isa/pnp.h>
-int num_pnp_cards = 0;
+static int num_pnp_cards = 0;
pnp_id pnp_devices[MAX_PNP_CARDS];
struct pnp_dlist_node *pnp_device_list;
static struct pnp_dlist_node **pnp_device_list_last_ptr;
@@ -100,10 +100,10 @@ nullpnp_attach(u_long csn, u_long vend_id, char *name,
/* The READ_DATA port that we are using currently */
static int pnp_rd_port;
-void pnp_send_Initiation_LFSR (void);
-int pnp_get_serial (pnp_id *p);
-void config_pnp_device (pnp_id *p, int csn);
-int pnp_isolation_protocol (void);
+static void pnp_send_Initiation_LFSR (void);
+static int pnp_get_serial (pnp_id *p);
+static void config_pnp_device (pnp_id *p, int csn);
+static int pnp_isolation_protocol (void);
void pnp_write(int d, u_char r);
u_char pnp_read(int d);
@@ -125,7 +125,7 @@ pnp_read(int d)
* Send Initiation LFSR as described in "Plug and Play ISA Specification",
* Intel May 94.
*/
-void
+static void
pnp_send_Initiation_LFSR()
{
int cur, i;
@@ -147,7 +147,7 @@ pnp_send_Initiation_LFSR()
/*
* Get the device's serial number. Returns 1 if the serial is valid.
*/
-int
+static int
pnp_get_serial(pnp_id *p)
{
int i, bit, valid = 0, sum = 0x6a;
@@ -329,7 +329,7 @@ enable_pnp_card()
* 4 bytes: board serial number (often 0 or -1 ?)
*/
-void
+static void
config_pnp_device(pnp_id *p, int csn)
{
static struct pnp_dlist_node *nod = NULL;
@@ -478,7 +478,7 @@ config_pnp_device(pnp_id *p, int csn)
* are saved to an array, pnp_devices. In the second pass, each
* card is woken up and the device configuration is called.
*/
-int
+static int
pnp_isolation_protocol()
{
int csn;
diff --git a/sys/i386/isa/rp.c b/sys/i386/isa/rp.c
index 9a578bd..53373b0 100644
--- a/sys/i386/isa/rp.c
+++ b/sys/i386/isa/rp.c
@@ -61,7 +61,7 @@
#define FALSE 0
#endif
-Byte_t RData[RDATASIZE] =
+static Byte_t RData[RDATASIZE] =
{
0x00, 0x09, 0xf6, 0x82,
0x02, 0x09, 0x86, 0xfb,
@@ -83,7 +83,7 @@ Byte_t RData[RDATASIZE] =
0x22, 0x09, 0x0a, 0x0a
};
-Byte_t RRegData[RREGDATASIZE]=
+static Byte_t RRegData[RREGDATASIZE]=
{
0x00, 0x09, 0xf6, 0x82, /* 00: Stop Rx processor */
0x08, 0x09, 0x8a, 0x13, /* 04: Tx software flow control */
@@ -100,7 +100,7 @@ Byte_t RRegData[RREGDATASIZE]=
0x22, 0x09, 0x0a, 0x0a /* 30: Rx FIFO Enable */
};
-CONTROLLER_T sController[CTL_SIZE] =
+static CONTROLLER_T sController[CTL_SIZE] =
{
{-1,-1,0,0,0,0,0,0,0,0,0,{0,0,0,0},{0,0,0,0},{-1,-1,-1,-1},{0,0,0,0}},
{-1,-1,0,0,0,0,0,0,0,0,0,{0,0,0,0},{0,0,0,0},{-1,-1,-1,-1},{0,0,0,0}},
@@ -116,12 +116,12 @@ Byte_t sIRQMap[16] =
};
#endif
-Byte_t sBitMapClrTbl[8] =
+static Byte_t sBitMapClrTbl[8] =
{
0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f
};
-Byte_t sBitMapSetTbl[8] =
+static Byte_t sBitMapSetTbl[8] =
{
0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80
};
@@ -772,7 +772,7 @@ static char* rp_pciprobe(pcici_t tag, pcidi_t type);
static void rp_pciattach(pcici_t tag, int unit);
static u_long rp_pcicount;
-struct pci_device rp_pcidevice = {
+static struct pci_device rp_pcidevice = {
"rp",
rp_pciprobe,
rp_pciattach,
diff --git a/sys/i386/isa/sound/ad1848.c b/sys/i386/isa/sound/ad1848.c
index e41edd9..8683d53 100644
--- a/sys/i386/isa/sound/ad1848.c
+++ b/sys/i386/isa/sound/ad1848.c
@@ -57,10 +57,6 @@
#include <i386/isa/sound/ad1848_mixer.h>
#include <i386/isa/sound/iwdefs.h>
-#if !defined(CONFIG_CS4232)
-extern struct isa_driver mssdriver;
-#endif
-
extern void IwaveStopDma(BYTE path);
typedef struct {
diff --git a/sys/i386/isa/sound/dev_table.c b/sys/i386/isa/sound/dev_table.c
index 42e5197..3061170 100644
--- a/sys/i386/isa/sound/dev_table.c
+++ b/sys/i386/isa/sound/dev_table.c
@@ -36,11 +36,11 @@ int sound_started = 0;
int sndtable_get_cardcount(void);
int snd_find_driver(int type);
-void sndtable_init(void);
+static void sndtable_init(void);
int sndtable_probe(int unit, struct address_info * hw_config);
int sndtable_init_card(int unit, struct address_info * hw_config);
-int sndtable_identify_card(char *name);
-void sound_chconf(int card_type, int ioaddr, int irq, int dma);
+static int sndtable_identify_card(char *name);
+static void sound_chconf(int card_type, int ioaddr, int irq, int dma);
static void start_services(void);
static void start_cards(void);
struct address_info *sound_getconf(int card_type);
@@ -115,7 +115,7 @@ start_cards()
printf("Sound initialization complete\n");
}
-void
+static void
sndtable_init()
{
start_cards();
@@ -242,7 +242,7 @@ sndtable_get_cardcount(void)
return num_audiodevs + num_mixers + num_synths + num_midis;
}
-int
+static int
sndtable_identify_card(char *name)
{
int i, n = num_sound_drivers;
@@ -262,7 +262,7 @@ sndtable_identify_card(char *name)
return 0;
}
-void
+static void
sound_chconf(int card_type, int ioaddr, int irq, int dma)
{
int j, ptr = -1, n = num_sound_cards;
diff --git a/sys/i386/isa/sound/gus_card.c b/sys/i386/isa/sound/gus_card.c
index 2f73ce6..7dac1bd 100644
--- a/sys/i386/isa/sound/gus_card.c
+++ b/sys/i386/isa/sound/gus_card.c
@@ -40,7 +40,7 @@ extern int gus_pcm_volume;
extern int have_gus_max;
extern int gus_timer_enabled;
-sound_os_info *gus_osp;
+static sound_os_info *gus_osp;
#ifndef NOGUSPNP
int IwaveOpen(char voices, char mode, struct address_info * hw);
diff --git a/sys/i386/isa/sound/gus_wave.c b/sys/i386/isa/sound/gus_wave.c
index 8cb3419..cd04999 100644
--- a/sys/i386/isa/sound/gus_wave.c
+++ b/sys/i386/isa/sound/gus_wave.c
@@ -53,7 +53,7 @@
#if defined(CONFIG_GUS)
-IWAVE iw;
+static IWAVE iw;
#define ENTER_CRITICAL
#define LEAVE_CRITICAL
@@ -62,7 +62,7 @@ IWAVE iw;
#define MAX_PATCH 256
-u_int gus_pnp_found[MAX_GUS_PNP] =
+static u_int gus_pnp_found[MAX_GUS_PNP] =
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
struct voice_info {
@@ -118,7 +118,7 @@ static int only_read_access = 0;
static int only_8_bits = 0;
int gus_wave_volume = 60;
-int gus_pcm_volume = 80;
+static int gus_pcm_volume = 80;
int have_gus_max = 0;
static int gus_line_vol = 100, gus_mic_vol = 0;
static u_char mix_image = 0x00;
@@ -161,7 +161,7 @@ static int pcm_current_intrflag;
extern sound_os_info *gus_osp;
-struct voice_info voices[32];
+static struct voice_info voices[32];
static int freq_div_table[] =
{
@@ -187,8 +187,8 @@ static int freq_div_table[] =
};
static struct patch_info *samples;
-struct patch_info *dbg_samples;
-int dbg_samplep;
+static struct patch_info *dbg_samples;
+static int dbg_samplep;
static long sample_ptrs[MAX_SAMPLE + 1];
static int sample_map[32];
@@ -204,20 +204,20 @@ static struct synth_info gus_info =
static void gus_default_mixer_init(void);
-int guswave_start_note2(int dev, int voice, int note_num, int volume);
+static int guswave_start_note2(int dev, int voice, int note_num, int volume);
static void gus_poke(long addr, u_char data);
-void compute_and_set_volume(int voice, int volume, int ramp_time);
+static void compute_and_set_volume(int voice, int volume, int ramp_time);
extern u_short gus_adagio_vol(int vel, int mainv, int xpn, int voicev);
extern u_short gus_linear_vol(int vol, int mainvol);
-void compute_volume(int voice, int volume);
+static void compute_volume(int voice, int volume);
void do_volume_irq(int voice);
static void set_input_volumes(void);
static void gus_tmr_install(int io_base);
-void SEND(int d, int r);
-int get_serial(int rd_port, u_char *data);
-void send_Initiation_LFSR(void);
-int isolation_protocol(int rd_port);
+static void SEND(int d, int r);
+static int get_serial(int rd_port, u_char *data);
+static void send_Initiation_LFSR(void);
+static int isolation_protocol(int rd_port);
#define INSTANT_RAMP -1 /* Instant change. No ramping */
@@ -295,48 +295,49 @@ int isolation_protocol(int rd_port);
{ outb(iwl_codec_base, reg); val = inb(iwl_codec_data); }
-u_char gus_look8(int reg);
-
-void gus_write16(int reg, u_int data);
-
-u_short gus_read16(int reg);
-
-void gus_write_addr(int reg, u_long address, int is16bit);
-void IwaveLineLevel(char level, char index);
-void IwaveInputSource(BYTE index, BYTE source);
-void IwaveDelay(WORD count);
-void IwaveStopDma(BYTE path);
-void IwavePnpGetCfg(void);
-void IwavePnpDevice(BYTE dev);
-void IwavePnpSetCfg(void);
-void IwavePnpKey(void);
-BYTE IwavePnpIsol(PORT * pnpread);
-void IwaveCfgIOSpace(void);
-
-void IwavePnpSerial(PORT pnprdp, BYTE csn, BYTE * vendor, DWORD * serial);
-
-
-void IwavePnpPeek(PORT pnprdp, WORD bytes, BYTE * data);
-void IwavePnpEeprom(BYTE ctrl);
-void IwavePnpActivate(BYTE dev, BYTE bool);
-
-void IwavePnpPower(BYTE mode);
-void IwavePnpWake(BYTE csn);
-PORT IwavePnpIOcheck(PORT base, BYTE no_ports);
-
-BYTE IwavePnpGetCSN(DWORD VendorID, BYTE csn_max);
-BYTE IwavePnpPing(DWORD VendorID);
-WORD IwaveMemSize(void);
-BYTE IwaveMemPeek(ADDRESS addr);
-void IwaveMemPoke(ADDRESS addr, BYTE datum);
-void IwaveMemCfg(DWORD * lpbanks);
-void IwaveCodecIrq(BYTE mode);
-WORD IwaveRegPeek(DWORD reg_mnem);
-
-void IwaveRegPoke(DWORD reg_mnem, WORD datum);
-void IwaveCodecMode(char mode);
-void IwaveLineMute(BYTE mute, BYTE inx);
-void Iwaveinitcodec(void);
+static u_char gus_look8(int reg);
+
+static void gus_write16(int reg, u_int data);
+
+static u_short gus_read16(int reg);
+
+static void gus_write_addr(int reg, u_long address, int is16bit);
+static void IwaveLineLevel(char level, char index);
+static void IwaveInputSource(BYTE index, BYTE source);
+static void IwaveDelay(WORD count);
+static void IwaveStopDma(BYTE path);
+static void IwavePnpGetCfg(void);
+static void IwavePnpDevice(BYTE dev);
+static void IwavePnpSetCfg(void);
+static void IwavePnpKey(void);
+static BYTE IwavePnpIsol(PORT * pnpread);
+static void IwaveCfgIOSpace(void);
+
+static void IwavePnpSerial(PORT pnprdp, BYTE csn,
+ BYTE * vendor, DWORD * serial);
+
+
+static void IwavePnpPeek(PORT pnprdp, WORD bytes, BYTE * data);
+static void IwavePnpEeprom(BYTE ctrl);
+static void IwavePnpActivate(BYTE dev, BYTE bool);
+
+static void IwavePnpPower(BYTE mode);
+static void IwavePnpWake(BYTE csn);
+static PORT IwavePnpIOcheck(PORT base, BYTE no_ports);
+
+static BYTE IwavePnpGetCSN(DWORD VendorID, BYTE csn_max);
+static BYTE IwavePnpPing(DWORD VendorID);
+static WORD IwaveMemSize(void);
+static BYTE IwaveMemPeek(ADDRESS addr);
+static void IwaveMemPoke(ADDRESS addr, BYTE datum);
+static void IwaveMemCfg(DWORD * lpbanks);
+static void IwaveCodecIrq(BYTE mode);
+static WORD IwaveRegPeek(DWORD reg_mnem);
+
+static void IwaveRegPoke(DWORD reg_mnem, WORD datum);
+static void IwaveCodecMode(char mode);
+static void IwaveLineMute(BYTE mute, BYTE inx);
+static void Iwaveinitcodec(void);
int IwaveOpen(char voices, char mode, struct address_info * hw);
@@ -431,7 +432,7 @@ gus_read8(int reg)
return val;
}
-u_char
+static u_char
gus_look8(int reg)
{ /* Reads from an indirect register (8 bit). No additional offset. */
u_long flags;
@@ -445,7 +446,7 @@ gus_look8(int reg)
return val;
}
-void
+static void
gus_write16(int reg, u_int data)
{ /* Writes to an indirect register (16 bit) */
u_long flags;
@@ -460,7 +461,7 @@ gus_write16(int reg, u_int data)
splx(flags);
}
-u_short
+static u_short
gus_read16(int reg)
{ /* Reads from an indirect register (16 bit). Offset 0x80. */
u_long flags;
@@ -478,7 +479,7 @@ gus_read16(int reg)
return ((hi << 8) & 0xff00) | lo;
}
-void
+static void
gus_write_addr(int reg, u_long address, int is16bit)
{ /* Writes an 24 bit memory address */
u_long hold_address;
@@ -1103,7 +1104,7 @@ guswave_volume_method(int dev, int mode)
volume_method = mode;
}
-void
+static void
compute_volume(int voice, int volume)
{
if (volume < 128)
@@ -1130,7 +1131,7 @@ compute_volume(int voice, int volume)
voices[voice].initial_volume = 4030;
}
-void
+static void
compute_and_set_volume(int voice, int volume, int ramp_time)
{
int curr, target, rate;
@@ -1276,7 +1277,7 @@ guswave_controller(int dev, int voice, int ctrl_num, int value)
}
}
-int
+static int
guswave_start_note2(int dev, int voice, int note_num, int volume)
{
int sample, best_sample, best_delta, delta_freq;
@@ -2905,7 +2906,7 @@ if (have_gus_max) {
/* start of pnp code */
-void
+static void
SEND(int d, int r)
{
outb(PADDRESS, d);
@@ -2918,7 +2919,7 @@ outb(PWRITE_DATA, r);
/*
* Get the device's serial number. Returns 1 if the serial is valid.
*/
-int
+static int
get_serial(int rd_port, u_char *data)
{
int i, bit, valid = 0, sum = 0x6a;
@@ -2946,7 +2947,7 @@ get_serial(int rd_port, u_char *data)
return valid;
}
-void
+static void
send_Initiation_LFSR()
{
int cur, i;
@@ -2966,7 +2967,7 @@ send_Initiation_LFSR()
-int
+static int
isolation_protocol(int rd_port)
{
int csn;
@@ -3006,7 +3007,7 @@ isolation_protocol(int rd_port)
-void
+static void
IwaveDelay(WORD count)
{
WORD cur_cnt = 0, last_cnt;
@@ -3041,7 +3042,7 @@ IwaveDelay(WORD count)
* ########################################################################
*/
-void
+static void
IwaveStopDma(BYTE path)
{
BYTE reg;
@@ -3068,7 +3069,7 @@ IwaveStopDma(BYTE path)
*
* ########################################################################
*/
-void
+static void
IwaveInputSource(BYTE index, BYTE source)
{
BYTE reg;
@@ -3081,7 +3082,7 @@ IwaveInputSource(BYTE index, BYTE source)
outb(iw.cdatap, (BYTE) (reg | source));
LEAVE_CRITICAL;
}
-void
+static void
IwavePnpGetCfg(void)
{
WORD val;
@@ -3159,7 +3160,7 @@ IwavePnpGetCfg(void)
LEAVE_CRITICAL;
}
-void
+static void
IwavePnpSetCfg(void)
{
ENTER_CRITICAL;
@@ -3232,7 +3233,7 @@ IwavePnpSetCfg(void)
LEAVE_CRITICAL;
}
-void
+static void
IwaveCfgIOSpace(void)
{
ENTER_CRITICAL;
@@ -3304,7 +3305,7 @@ IwaveCfgIOSpace(void)
/* write cycles of 0x00 to PIDXR before issuing the key. */
/* */
/* ######################################################################## */
-void
+static void
IwavePnpKey(void)
{
/* send_Initiation_LFSR(); */
@@ -3329,7 +3330,7 @@ IwavePnpKey(void)
}
-BYTE
+static BYTE
IwavePnpIsol(PORT * pnpread)
{
int num_pnp_devs;
@@ -3374,7 +3375,7 @@ IwavePnpIsol(PORT * pnpread)
/* will be obtained. */
/* */
/* ######################################################################## */
-void
+static void
IwavePnpSerial(PORT pnprdp,
BYTE csn,
BYTE * vendor,
@@ -3438,7 +3439,7 @@ IwavePnpSerial(PORT pnprdp,
/* should issue a WAKE[CSN] command */
/* */
/* ######################################################################## */
-void
+static void
IwavePnpPeek(PORT pnprdp, WORD bytes, BYTE * data)
{
WORD i;
@@ -3467,7 +3468,7 @@ IwavePnpPeek(PORT pnprdp, WORD bytes, BYTE * data)
/* IwavePnpActivate(AUDIO,OFF). */
/* */
/* ######################################################################## */
-void
+static void
IwavePnpEeprom(BYTE ctrl)
{
ENTER_CRITICAL;
@@ -3487,7 +3488,7 @@ IwavePnpEeprom(BYTE ctrl)
/* activated. */
/* */
/* ######################################################################## */
-void
+static void
IwavePnpActivate(BYTE dev, BYTE bool)
{
IwavePnpDevice(dev); /* select audio device */
@@ -3506,7 +3507,7 @@ IwavePnpActivate(BYTE dev, BYTE bool)
/* that the PNP state machine is in configuration mode. */
/* */
/* ######################################################################## */
-void
+static void
IwavePnpDevice(BYTE dev)
{
ENTER_CRITICAL;
@@ -3526,7 +3527,7 @@ IwavePnpDevice(BYTE dev)
/* mode. */
/* */
/* ######################################################################## */
-void
+static void
IwavePnpPower(BYTE mode)
{
ENTER_CRITICAL;
@@ -3546,7 +3547,7 @@ IwavePnpPower(BYTE mode)
/* "wait for key" state. */
/* */
/* ######################################################################## */
-void
+static void
IwavePnpWake(BYTE csn)
{
ENTER_CRITICAL;
@@ -3569,7 +3570,7 @@ IwavePnpWake(BYTE csn)
/* activated and that the PNP state machine is in config mode. */
/* */
/* ######################################################################## */
-PORT
+static PORT
IwavePnpIOcheck(PORT base, BYTE no_ports)
{
BYTE i;
@@ -3606,7 +3607,7 @@ IwavePnpIOcheck(PORT base, BYTE no_ports)
/* InterWave IC it will return FALSE. */
/* */
/* ######################################################################## */
-BYTE
+static BYTE
IwavePnpGetCSN(DWORD VendorID, BYTE csn_max)
{
BYTE csn;
@@ -3650,7 +3651,7 @@ IwavePnpGetCSN(DWORD VendorID, BYTE csn_max)
/* sure they are compatible with the board. */
/* */
/* ######################################################################## */
-BYTE
+static BYTE
IwavePnpPing(DWORD VendorID)
{
BYTE csn;
@@ -3681,7 +3682,7 @@ IwavePnpPing(DWORD VendorID)
/* end of pnp code */
-WORD
+static WORD
IwaveMemSize(void)
{
BYTE datum = 0x55;
@@ -3701,7 +3702,7 @@ IwaveMemSize(void)
return ((WORD) (local >> 10));
}
-BYTE
+static BYTE
IwaveMemPeek(ADDRESS addr)
{
PORT p3xr;
@@ -3717,7 +3718,7 @@ IwaveMemPeek(ADDRESS addr)
}
-void
+static void
IwaveMemPoke(ADDRESS addr, BYTE datum)
{
PORT p3xr;
@@ -3751,7 +3752,7 @@ IwaveMemPoke(ADDRESS addr, BYTE datum)
/* full addressing span (LMCFI[3:0]=0xC). */
/* */
/* ######################################################################## */
-void
+static void
IwaveMemCfg(DWORD * lpbanks)
{
DWORD bank[4] = {0L, 0L, 0L, 0L};
@@ -3850,7 +3851,7 @@ IwaveMemCfg(DWORD * lpbanks)
/* IwaveCodeIrq(~CODEC_IRQ_ENABLE). */
/**/
/* ######################################################################## */
-void
+static void
IwaveCodecIrq(BYTE mode)
{
BYTE reg;
@@ -3886,7 +3887,7 @@ IwaveCodecIrq(BYTE mode)
/* meaningless data. */
/**/
/* ######################################################################### */
-WORD
+static WORD
IwaveRegPeek(DWORD reg_mnem)
{
BYTE index, val;
@@ -4016,7 +4017,7 @@ IwaveRegPeek(DWORD reg_mnem)
/* that the writes are to valid registers. */
/**/
/* ######################################################################### */
-void
+static void
IwaveRegPoke(DWORD reg_mnem, WORD datum)
{
BYTE index;
@@ -4131,7 +4132,7 @@ IwaveRegPoke(DWORD reg_mnem, WORD datum)
}
-void
+static void
IwaveLineLevel(char level, char index)
{
char reg;
@@ -4145,7 +4146,7 @@ IwaveLineLevel(char level, char index)
LEAVE_CRITICAL;
}
-void
+static void
IwaveCodecMode(char mode)
{
char reg;
@@ -4158,7 +4159,7 @@ IwaveCodecMode(char mode)
iw.cmode = mode;
}
-void
+static void
IwaveLineMute(BYTE mute, BYTE inx)
{
BYTE reg;
@@ -4173,7 +4174,7 @@ IwaveLineMute(BYTE mute, BYTE inx)
LEAVE_CRITICAL;
}
-void
+static void
Iwaveinitcodec()
{
@@ -4654,7 +4655,7 @@ do_loop_irq(int voice)
splx(flags);
}
-void
+static void
do_volume_irq(int voice)
{
u_char tmp;
diff --git a/sys/i386/isa/sound/midibuf.c b/sys/i386/isa/sound/midibuf.c
index e452e0a..af5ddc5 100644
--- a/sys/i386/isa/sound/midibuf.c
+++ b/sys/i386/isa/sound/midibuf.c
@@ -40,7 +40,7 @@
int
MIDIbuf_poll (int dev, struct fileinfo *file, int events, select_table * wait);
-void
+static void
drain_midi_queue(int dev);
static int *midi_sleeper[MAX_MIDI_DEV] = {NULL};
@@ -86,7 +86,7 @@ static volatile int open_devs = 0;
splx(flags); \
}
-void
+static void
drain_midi_queue(int dev)
{
diff --git a/sys/i386/isa/sound/opl3.c b/sys/i386/isa/sound/opl3.c
index fbc4398..1baeadd 100644
--- a/sys/i386/isa/sound/opl3.c
+++ b/sys/i386/isa/sound/opl3.c
@@ -351,7 +351,7 @@ opl3_set_instr(int dev, int voice, int instr_no)
* volume -8 it was implemented as a table because it is only 128 bytes and
* it saves a lot of log() calculations. (RH)
*/
-char fm_volume_table[128] =
+static char fm_volume_table[128] =
{
-64, -48, -40, -35, -32, -29, -27, -26,
-24, -23, -21, -20, -19, -18, -18, -17,
diff --git a/sys/i386/isa/sound/pas2_card.c b/sys/i386/isa/sound/pas2_card.c
index 79acf57..06ab9f2 100644
--- a/sys/i386/isa/sound/pas2_card.c
+++ b/sys/i386/isa/sound/pas2_card.c
@@ -43,7 +43,7 @@ int translat_code;
static int pas_intr_mask = 0;
static int pas_irq = 0;
-sound_os_info *pas_osp;
+static sound_os_info *pas_osp;
char pas_model;
static char *pas_model_names[] =
@@ -72,7 +72,7 @@ pas_write(u_char data, int ioaddr)
outb(ioaddr ^ translat_code, data);
}
-void
+static void
pas2_msg(char *foo)
{
printf(" PAS2: %s.\n", foo);
@@ -130,7 +130,7 @@ pas_remove_intr(int mask)
/******************* Begin of the Initialization Code ******************/
-int
+static int
config_pas_hw(struct address_info * hw_config)
{
char ok = 1;
@@ -271,7 +271,7 @@ config_pas_hw(struct address_info * hw_config)
return ok;
}
-int
+static int
detect_pas_hw(struct address_info * hw_config)
{
u_char board_id, foo;
diff --git a/sys/i386/isa/sound/pas2_mixer.c b/sys/i386/isa/sound/pas2_mixer.c
index 4831bd2..305ef45 100644
--- a/sys/i386/isa/sound/pas2_mixer.c
+++ b/sys/i386/isa/sound/pas2_mixer.c
@@ -246,7 +246,7 @@ pas_mixer_reset(void)
set_mode(P_M_MV508_LOUDNESS | P_M_MV508_ENHANCE_40);
}
-int
+static int
pas_mixer_ioctl(int dev, u_int cmd, ioctl_arg arg)
{
TRACE(printf("pas2_mixer.c: int pas_mixer_ioctl(u_int cmd = %X, u_int arg = %X)\n", cmd, arg));
diff --git a/sys/i386/isa/sound/pas2_pcm.c b/sys/i386/isa/sound/pas2_pcm.c
index fd4d5c0..f2fc95c 100644
--- a/sys/i386/isa/sound/pas2_pcm.c
+++ b/sys/i386/isa/sound/pas2_pcm.c
@@ -55,7 +55,7 @@ static u_short pcm_bitsok = 8; /* mask of OK bits */
static int my_devnum = 0;
static int open_mode = 0;
-int
+static int
pcm_set_speed(int arg)
{
int foo, tmp;
@@ -114,7 +114,7 @@ pcm_set_speed(int arg)
return pcm_speed;
}
-int
+static int
pcm_set_channels(int arg)
{
@@ -131,7 +131,7 @@ pcm_set_channels(int arg)
return pcm_channels;
}
-int
+static int
pcm_set_bits(int arg)
{
if ((arg & pcm_bitsok) != arg)
diff --git a/sys/i386/isa/sound/sb_dsp.c b/sys/i386/isa/sound/sb_dsp.c
index f9d38e7..88d3fa1 100644
--- a/sys/i386/isa/sound/sb_dsp.c
+++ b/sys/i386/isa/sound/sb_dsp.c
@@ -53,10 +53,10 @@
int sbc_base = 0;
-int sbc_irq = 0;
+static int sbc_irq = 0;
static int open_mode = 0; /* Read, write or both */
int Jazz16_detected = 0;
-int sb_no_recording = 0;
+static int sb_no_recording = 0;
static int dsp_count = 0;
static int trigger_bits;
@@ -102,10 +102,10 @@ volatile int sb_intr_active = 0;
static int dsp_speed(int);
static int dsp_set_stereo(int mode);
static void sb_dsp_reset(int dev);
-sound_os_info *sb_osp = NULL;
+static sound_os_info *sb_osp = NULL;
#if defined(CONFIG_MIDI) || defined(CONFIG_AUDIO)
-void dsp_speaker(char state);
+static void dsp_speaker(char state);
/*
* Common code for the midi and pcm functions
@@ -218,7 +218,7 @@ sb_reset_dsp(void)
#ifdef CONFIG_AUDIO
-void
+static void
dsp_speaker(char state)
{
if (state)
diff --git a/sys/i386/isa/sound/sb_midi.c b/sys/i386/isa/sound/sb_midi.c
index a1d50bd..3d773be 100644
--- a/sys/i386/isa/sound/sb_midi.c
+++ b/sys/i386/isa/sound/sb_midi.c
@@ -53,12 +53,12 @@ extern int sb_dsp_highspeed;
extern volatile int sb_irq_mode;
extern int sb_duplex_midi;
extern int sb_intr_active;
-int input_opened = 0;
+static int input_opened = 0;
static int my_dev;
extern sound_os_info *sb_osp;
-void (*midi_input_intr) (int dev, u_char data);
+static void (*midi_input_intr) (int dev, u_char data);
static int
sb_midi_open(int dev, int mode, void (*input) (int dev, u_char data),
diff --git a/sys/i386/isa/sound/sequencer.c b/sys/i386/isa/sound/sequencer.c
index d6bd72d3..3639cf6 100644
--- a/sys/i386/isa/sound/sequencer.c
+++ b/sys/i386/isa/sound/sequencer.c
@@ -36,7 +36,7 @@
#include <i386/isa/sound/midi_ctrl.h>
-void seq_drain_midi_queues(void);
+static void seq_drain_midi_queues(void);
int
sequencer_poll (int dev, struct fileinfo *file, int events, select_table * wait);
static int sequencer_ok = 0;
@@ -68,9 +68,9 @@ static volatile struct snd_wait midi_sleep_flag = {0};
static int midi_opened[MAX_MIDI_DEV] = {0};
static int midi_written[MAX_MIDI_DEV] = {0};
-u_long prev_input_time = 0;
-int prev_event_time;
-u_long seq_time = 0;
+static u_long prev_input_time = 0;
+static int prev_event_time;
+static u_long seq_time = 0;
#include <i386/isa/sound/tuning.h>
@@ -1122,7 +1122,7 @@ sequencer_open(int dev, struct fileinfo * file)
return 0;
}
-void
+static void
seq_drain_midi_queues(void)
{
int i, n;
diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c
index 59311ca..c731730 100644
--- a/sys/i386/isa/sound/soundcard.c
+++ b/sys/i386/isa/sound/soundcard.c
@@ -71,10 +71,9 @@ audio_poll(int dev, struct fileinfo * file, int events, select_table * wait);
int
sequencer_poll (int dev, struct fileinfo *file, int events, select_table * wait);
-void sndintr __P((int unit));
-int sndprobe __P((struct isa_device *));
-int sndattach __P((struct isa_device *));
-int sndmmap __P((dev_t dev, int offset, int nprot ));
+static int sndprobe __P((struct isa_device *));
+static int sndattach __P((struct isa_device *));
+static int sndmmap __P((dev_t dev, int offset, int nprot ));
static d_open_t sndopen;
static d_close_t sndclose;
@@ -108,8 +107,8 @@ static void sound_mem_init(void);
*/
struct isa_driver opldriver = {sndprobe, sndattach, "opl"};
-struct isa_driver trixdriver = {sndprobe, sndattach, "trix"};
-struct isa_driver trixsbdriver = {sndprobe, sndattach, "trixsb"};
+static struct isa_driver trixdriver = {sndprobe, sndattach, "trix"};
+static struct isa_driver trixsbdriver = {sndprobe, sndattach, "trixsb"};
struct isa_driver sbdriver = {sndprobe, sndattach, "sb"};
struct isa_driver sbxvidriver = {sndprobe, sndattach, "sbxvi"};
struct isa_driver sbmididriver = {sndprobe, sndattach, "sbmidi"};
@@ -117,11 +116,11 @@ struct isa_driver awedriver = {sndprobe, sndattach, "awe"};
struct isa_driver pasdriver = {sndprobe, sndattach, "pas"};
struct isa_driver mpudriver = {sndprobe, sndattach, "mpu"};
struct isa_driver gusdriver = {sndprobe, sndattach, "gus"};
-struct isa_driver gusxvidriver = {sndprobe, sndattach, "gusxvi"};
-struct isa_driver gusmaxdriver = {sndprobe, sndattach, "gusmax"};
+static struct isa_driver gusxvidriver = {sndprobe, sndattach, "gusxvi"};
+static struct isa_driver gusmaxdriver = {sndprobe, sndattach, "gusmax"};
struct isa_driver uartdriver = {sndprobe, sndattach, "uart"};
struct isa_driver mssdriver = {sndprobe, sndattach, "mss"};
-struct isa_driver cssdriver = {sndprobe, sndattach, "css"};
+static struct isa_driver cssdriver = {sndprobe, sndattach, "css"};
struct isa_driver sscapedriver = {sndprobe, sndattach, "sscape"};
struct isa_driver sscape_mssdriver = {sndprobe, sndattach, "sscape_mss"};
@@ -140,7 +139,7 @@ get_time(void)
(u_long) timecopy.tv_sec * hz;
}
-int
+static int
sndmmap( dev_t dev, int offset, int nprot )
{
int unit;
@@ -337,7 +336,7 @@ static sound_os_info *temp_osp;
* The parameters from the config line are passed to the hw_config struct.
*/
-int
+static int
sndprobe(struct isa_device * dev)
{
struct address_info hw_config;
@@ -389,7 +388,7 @@ sndprobe(struct isa_device * dev)
return 0;
}
-int
+static int
sndattach(struct isa_device * dev)
{
int unit;
diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c
index 4b813ca..ca53452 100644
--- a/sys/i386/isa/spkr.c
+++ b/sys/i386/isa/spkr.c
@@ -4,7 +4,7 @@
* v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
* modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
*
- * $Id: spkr.c,v 1.30 1997/12/02 21:06:28 phk Exp $
+ * $Id: spkr.c,v 1.31 1998/01/24 02:54:25 eivind Exp $
*/
#include "speaker.h"
@@ -26,7 +26,7 @@
#ifdef DEVFS
#include <sys/devfsext.h>
-void *devfs_token;
+static void *devfs_token;
#endif
static d_open_t spkropen;
diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c
index 5a38841..b0938cc 100644
--- a/sys/i386/isa/stallion.c
+++ b/sys/i386/isa/stallion.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: stallion.c,v 1.14 1997/12/06 13:23:15 bde Exp $
+ * $Id: stallion.c,v 1.15 1997/12/16 17:40:09 eivind Exp $
*/
/*****************************************************************************/
@@ -434,8 +434,8 @@ static int stl_cd1400clkdivs[] = {
* externally visible functions.
*/
-int stlprobe(struct isa_device *idp);
-int stlattach(struct isa_device *idp);
+static int stlprobe(struct isa_device *idp);
+static int stlattach(struct isa_device *idp);
STATIC d_open_t stlopen;
STATIC d_close_t stlclose;
@@ -567,7 +567,7 @@ SYSINIT(sidev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,stl_drvinit,NULL)
* they are done in the stlpciprobe() routine).
*/
-int stlprobe(struct isa_device *idp)
+static int stlprobe(struct isa_device *idp)
{
unsigned int status;
@@ -624,7 +624,7 @@ static int stl_findfreeunit()
* Allocate resources for and initialize the specified board.
*/
-int stlattach(struct isa_device *idp)
+static int stlattach(struct isa_device *idp)
{
stlbrd_t *brdp;
diff --git a/sys/i386/isa/wcd.c b/sys/i386/isa/wcd.c
index 02e7df4..3548bc1 100644
--- a/sys/i386/isa/wcd.c
+++ b/sys/i386/isa/wcd.c
@@ -13,7 +13,7 @@
* all derivative works or modified versions.
*
* From: Version 1.9, Mon Oct 9 20:27:42 MSK 1995
- * $Id: wcd.c,v 1.49 1997/12/02 21:06:30 phk Exp $
+ * $Id: wcd.c,v 1.50 1998/01/24 02:54:27 eivind Exp $
*/
#include "wdc.h"
@@ -83,7 +83,7 @@ struct toc {
/*
* Volume size info.
*/
-struct volinfo {
+static struct volinfo {
u_long volsize; /* Volume size in blocks */
u_long blksize; /* Block size in bytes */
} info;
@@ -265,8 +265,8 @@ struct wcd {
#endif
};
-struct wcd *wcdtab[NUNIT]; /* Drive info by unit number */
-static int wcdnlun = 0; /* Number of configured drives */
+static struct wcd *wcdtab[NUNIT]; /* Drive info by unit number */
+static int wcdnlun = 0; /* Number of configured drives */
static struct wcd *wcd_init_lun(struct atapi *ata, int unit,
struct atapi_params *ap, int lun);
diff --git a/sys/i386/isa/wfd.c b/sys/i386/isa/wfd.c
index 0250785..0683dba 100644
--- a/sys/i386/isa/wfd.c
+++ b/sys/i386/isa/wfd.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: wfd.c,v 1.5 1998/01/29 19:02:51 pst Exp $
+ * $Id: wfd.c,v 1.6 1998/02/01 21:57:49 bde Exp $
*/
/*
@@ -139,8 +139,8 @@ struct wfd {
struct diskslices *dk_slices; /* virtual drives */
};
-struct wfd *wfdtab[NUNIT]; /* Drive info by unit number */
-static int wfdnlun = 0; /* Number of configured drives */
+static struct wfd *wfdtab[NUNIT]; /* Drive info by unit number */
+static int wfdnlun = 0; /* Number of configured drives */
static void wfd_start (struct wfd *t);
static void wfd_done (struct wfd *t, struct buf *bp, int resid,
diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c
index d52a556..66a104a 100644
--- a/sys/i386/linux/imgact_linux.c
+++ b/sys/i386/linux/imgact_linux.c
@@ -28,7 +28,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: imgact_linux.c,v 1.24 1997/07/20 16:05:50 bde Exp $
+ * $Id: imgact_linux.c,v 1.25 1997/12/05 19:55:37 bde Exp $
*/
#include <sys/param.h>
@@ -53,9 +53,9 @@
#include <i386/linux/linux.h>
-extern int exec_linux_imgact __P((struct image_params *iparams));
+static int exec_linux_imgact __P((struct image_params *iparams));
-int
+static int
exec_linux_imgact(imgp)
struct image_params *imgp;
{
@@ -232,6 +232,6 @@ exec_linux_imgact(imgp)
* Since `const' objects end up in the text segment, TEXT_SET is the
* correct directive to use.
*/
-const struct execsw linux_execsw = { exec_linux_imgact, "linux a.out" };
+static const struct execsw linux_execsw = { exec_linux_imgact, "linux a.out" };
TEXT_SET(execsw_set, linux_execsw);
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index 3c60ca0..8c128ee 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_sysvec.c,v 1.22 1998/02/04 22:32:28 eivind Exp $
+ * $Id: linux_sysvec.c,v 1.23 1998/02/06 12:13:19 eivind Exp $
*/
/* XXX we use functions that might not exist. */
@@ -56,10 +56,14 @@
#include <i386/linux/linux.h>
#include <i386/linux/linux_proto.h>
-int linux_fixup __P((int **stack_base, struct image_params *iparams));
-int elf_linux_fixup __P((int **stack_base, struct image_params *iparams));
-void linux_prepsyscall __P((struct trapframe *tf, int *args, u_int *code, caddr_t *params));
-void linux_sendsig __P((sig_t catcher, int sig, int mask, u_long code));
+static int linux_fixup __P((int **stack_base,
+ struct image_params *iparams));
+static int elf_linux_fixup __P((int **stack_base,
+ struct image_params *iparams));
+static void linux_prepsyscall __P((struct trapframe *tf, int *args,
+ u_int *code, caddr_t *params));
+static void linux_sendsig __P((sig_t catcher, int sig, int mask,
+ u_long code));
/*
* Linux syscalls return negative errno's, we do positive and map them
@@ -94,7 +98,8 @@ int linux_to_bsd_signal[LINUX_NSIG] = {
SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH, SIGURG, SIGURG, 0
};
-int linux_fixup(int **stack_base, struct image_params *imgp)
+static int
+linux_fixup(int **stack_base, struct image_params *imgp)
{
int *argv, *envp;
@@ -109,7 +114,8 @@ int linux_fixup(int **stack_base, struct image_params *imgp)
return 0;
}
-int elf_linux_fixup(int **stack_base, struct image_params *imgp)
+static int
+elf_linux_fixup(int **stack_base, struct image_params *imgp)
{
Elf32_Auxargs *args = (Elf32_Auxargs *)imgp->auxargs;
int *pos;
@@ -156,7 +162,7 @@ extern int _ucodesel, _udatasel;
* specified pc, psl.
*/
-void
+static void
linux_sendsig(sig_t catcher, int sig, int mask, u_long code)
{
register struct proc *p = curproc;
@@ -349,7 +355,7 @@ linux_sigreturn(p, args)
return (EJUSTRETURN);
}
-void
+static void
linux_prepsyscall(struct trapframe *tf, int *args, u_int *code, caddr_t *params)
{
args[0] = tf->tf_ebx;
@@ -395,7 +401,7 @@ struct sysentvec elf_linux_sysvec = {
/*
* Installed either via SYSINIT() or via LKM stubs.
*/
-Elf32_Brandinfo linux_brand = {
+static Elf32_Brandinfo linux_brand = {
"Linux",
"/compat/linux",
"/lib/ld-linux.so.1",
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index da85b08..0732bd1 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.107 1997/12/28 17:33:10 phk Exp $
+ * $Id: clock.c,v 1.108 1998/01/28 10:41:33 phk Exp $
*/
/*
@@ -132,7 +132,7 @@ u_int tsc_bias;
u_int tsc_comultiplier;
u_int tsc_freq;
u_int tsc_multiplier;
-u_int tsc_present;
+static u_int tsc_present;
int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
static int beeping = 0;
diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c
index 7220d1e..a7a971b 100644
--- a/sys/isofs/cd9660/cd9660_node.c
+++ b/sys/isofs/cd9660/cd9660_node.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94
- * $Id: cd9660_node.c,v 1.23 1998/02/04 22:32:29 eivind Exp $
+ * $Id: cd9660_node.c,v 1.24 1998/02/06 12:13:20 eivind Exp $
*/
#include <sys/param.h>
@@ -55,10 +55,10 @@
/*
* Structures associated with iso_node caching.
*/
-struct iso_node **isohashtbl;
-u_long isohash;
+static struct iso_node **isohashtbl;
+static u_long isohash;
#define INOHASH(device, inum) (((device) + ((inum)>>12)) & isohash)
-struct simplelock cd9660_ihash_slock;
+static struct simplelock cd9660_ihash_slock;
static void cd9660_ihashrem __P((struct iso_node *));
static unsigned cd9660_chars2ui __P((unsigned char *begin, int len));
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index a65f836..8d2b69c 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: imgact_elf.c,v 1.19 1997/04/13 01:48:21 dyson Exp $
+ * $Id: imgact_elf.c,v 1.20 1997/09/21 03:13:21 peter Exp $
*/
#include "opt_rlimit.h"
@@ -69,7 +69,7 @@ static int elf_check_header __P((const Elf32_Ehdr *hdr, int type));
static int elf_load_section __P((struct vmspace *vmspace, struct vnode *vp, vm_offset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot));
static int elf_load_file __P((struct proc *p, char *file, u_long *addr, u_long *entry));
static int elf_freebsd_fixup __P((int **stack_base, struct image_params *imgp));
-int exec_elf_imgact __P((struct image_params *imgp));
+static int exec_elf_imgact __P((struct image_params *imgp));
static int elf_trace = 0;
SYSCTL_INT(_debug, OID_AUTO, elf_trace, CTLFLAG_RW, &elf_trace, 0, "");
@@ -463,7 +463,7 @@ fail:
return error;
}
-int
+static int
exec_elf_imgact(struct image_params *imgp)
{
const Elf32_Ehdr *hdr = (const Elf32_Ehdr *) imgp->image_header;
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index d0fa6e4..e0e2393 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94
- * $Id: kern_malloc.c,v 1.41 1998/02/05 03:32:06 dyson Exp $
+ * $Id: kern_malloc.c,v 1.42 1998/02/06 12:13:23 eivind Exp $
*/
#include <sys/param.h>
@@ -56,7 +56,7 @@ SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_FIRST, kmeminit, NULL)
static MALLOC_DEFINE(M_FREE, "free", "should be on free list");
-struct malloc_type *kmemstatistics = M_FREE;
+static struct malloc_type *kmemstatistics = M_FREE;
static struct kmembuckets bucket[MINBUCKET + 16];
static struct kmemusage *kmemusage;
static char *kmembase;
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 63b193d..029db1f 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_proc.c 8.7 (Berkeley) 2/14/95
- * $Id: kern_proc.c,v 1.33 1998/02/04 22:32:33 eivind Exp $
+ * $Id: kern_proc.c,v 1.34 1998/02/06 12:13:24 eivind Exp $
*/
#include <sys/param.h>
@@ -69,7 +69,7 @@ struct uidinfo {
long ui_proccnt;
};
#define UIHASH(uid) (&uihashtbl[(uid) & uihash])
-LIST_HEAD(uihashhead, uidinfo) *uihashtbl;
+static LIST_HEAD(uihashhead, uidinfo) *uihashtbl;
static u_long uihash; /* size of hash table - 1 */
static void orphanpg __P((struct pgrp *pg));
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index d1bb77f..02c288e 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_resource.c 8.5 (Berkeley) 1/21/94
- * $Id: kern_resource.c,v 1.30 1998/01/19 12:39:00 bde Exp $
+ * $Id: kern_resource.c,v 1.31 1998/02/04 18:43:10 dg Exp $
*/
#include "opt_compat.h"
@@ -58,8 +58,8 @@
#include <vm/pmap.h>
#include <vm/vm_map.h>
-int donice __P((struct proc *curp, struct proc *chgp, int n));
-int dosetrlimit __P((struct proc *p, u_int which, struct rlimit *limp));
+static int donice __P((struct proc *curp, struct proc *chgp, int n));
+static int dosetrlimit __P((struct proc *p, u_int which, struct rlimit *limp));
/*
* Resource controls and accounting.
@@ -186,7 +186,7 @@ setpriority(curp, uap)
return (error);
}
-int
+static int
donice(curp, chgp, n)
register struct proc *curp, *chgp;
register int n;
@@ -360,7 +360,7 @@ setrlimit(p, uap)
return (dosetrlimit(p, uap->which, &alim));
}
-int
+static int
dosetrlimit(p, which, limp)
struct proc *p;
u_int which;
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index 7397775..0b5a162 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.63 1997/12/15 01:14:10 tegge Exp $
+ * $Id: mp_machdep.c,v 1.64 1997/12/15 02:18:20 tegge Exp $
*/
#include "opt_smp.h"
@@ -265,7 +265,7 @@ static struct {
/* Bitmap of all available CPUs */
u_int all_cpus;
-/* AP uses this PTD during bootstrap */
+/* AP uses this PTD during bootstrap. Do not staticize. */
pd_entry_t *bootPTD;
/* Hotwire a 0->4MB V==P mapping */
@@ -689,10 +689,10 @@ static int default_data[7][5] =
/* the bus data */
-bus_datum bus_data[NBUS];
+static bus_datum bus_data[NBUS];
/* the IO INT data, one entry per possible APIC INTerrupt */
-io_int io_apic_ints[NINTR];
+static io_int io_apic_ints[NINTR];
static int nintrs;
@@ -1984,12 +1984,13 @@ int smp_active = 0; /* are the APs allowed to run? */
SYSCTL_INT(_machdep, OID_AUTO, smp_active, CTLFLAG_RW, &smp_active, 0, "");
/* XXX maybe should be hw.ncpu */
-int smp_cpus = 1; /* how many cpu's running */
+static int smp_cpus = 1; /* how many cpu's running */
SYSCTL_INT(_machdep, OID_AUTO, smp_cpus, CTLFLAG_RD, &smp_cpus, 0, "");
int invltlb_ok = 0; /* throttle smp_invltlb() till safe */
SYSCTL_INT(_machdep, OID_AUTO, invltlb_ok, CTLFLAG_RW, &invltlb_ok, 0, "");
+/* Warning: Do not staticize. Used from swtch.s */
int do_page_zero_idle = 0; /* bzero pages for fun and profit in idleloop */
SYSCTL_INT(_machdep, OID_AUTO, do_page_zero_idle, CTLFLAG_RW,
&do_page_zero_idle, 0, "");
@@ -2092,6 +2093,7 @@ putfmtrr()
#define CHECKSTATE_SYS 1
#define CHECKSTATE_INTR 2
+/* Do not staticize. Used from apic_vector.s */
struct proc* checkstate_curproc[NCPU];
int checkstate_cpustate[NCPU];
u_long checkstate_pc[NCPU];
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 3565e95..8c008a2 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -16,7 +16,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: sys_pipe.c,v 1.37 1998/02/04 22:32:35 eivind Exp $
+ * $Id: sys_pipe.c,v 1.38 1998/02/06 12:13:26 eivind Exp $
*/
/*
@@ -122,7 +122,7 @@ static struct fileops pipeops =
* Limit the number of "big" pipes
*/
#define LIMITBIGPIPES 32
-int nbigpipe;
+static int nbigpipe;
static int amountpipekva;
@@ -139,7 +139,7 @@ static void pipe_clone_write_buffer __P((struct pipe *wpipe));
#endif
static void pipespace __P((struct pipe *cpipe));
-vm_zone_t pipe_zone;
+static vm_zone_t pipe_zone;
/*
* The pipe system call for the DTYPE_PIPE type of pipes
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
index 701f917..4d05cad 100644
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -1,4 +1,4 @@
-/* $Id: sysv_shm.c,v 1.32 1997/11/06 19:29:25 phk Exp $ */
+/* $Id: sysv_shm.c,v 1.33 1997/12/16 17:40:23 eivind Exp $ */
/* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */
/*
@@ -77,7 +77,7 @@ static int shmget_allocate_segment __P((struct proc *p, struct shmget_args *uap,
static int shmget_existing __P((struct proc *p, struct shmget_args *uap, int mode, int segnum));
/* XXX casting to (sy_call_t *) is bogus, as usual. */
-sy_call_t *shmcalls[] = {
+static sy_call_t *shmcalls[] = {
(sy_call_t *)shmat, (sy_call_t *)oshmctl,
(sy_call_t *)shmdt, (sy_call_t *)shmget,
(sy_call_t *)shmctl
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 20004a7..c1a5826 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94
- * $Id: uipc_syscalls.c,v 1.34 1997/12/15 02:29:10 msmith Exp $
+ * $Id: uipc_syscalls.c,v 1.35 1997/12/16 17:40:30 eivind Exp $
*/
#include "opt_compat.h"
@@ -54,8 +54,8 @@
#include <sys/ktrace.h>
#endif
-extern int sendit __P((struct proc *p, int s, struct msghdr *mp, int flags));
-extern int recvit __P((struct proc *p, int s, struct msghdr *mp,
+static int sendit __P((struct proc *p, int s, struct msghdr *mp, int flags));
+static int recvit __P((struct proc *p, int s, struct msghdr *mp,
caddr_t namelenp));
static int accept1 __P((struct proc *p, struct accept_args *uap, int compat));
@@ -397,7 +397,7 @@ free1:
return (error);
}
-int
+static int
sendit(p, s, mp, flags)
register struct proc *p;
int s;
@@ -633,7 +633,7 @@ done:
return (error);
}
-int
+static int
recvit(p, s, mp, namelenp)
register struct proc *p;
int s;
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 802b069..683b99c 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -13,7 +13,7 @@
* bad that happens because of using this software isn't the responsibility
* of the author. This software is distributed AS-IS.
*
- * $Id: vfs_aio.c,v 1.21 1998/02/04 22:32:38 eivind Exp $
+ * $Id: vfs_aio.c,v 1.22 1998/02/06 12:13:29 eivind Exp $
*/
/*
@@ -92,20 +92,20 @@ static int jobrefid;
#define AIOD_LIFETIME_DEFAULT (30 * hz)
#endif
-int max_aio_procs = MAX_AIO_PROCS;
-int num_aio_procs = 0;
-int target_aio_procs = TARGET_AIO_PROCS;
-int max_queue_count = MAX_AIO_QUEUE;
-int num_queue_count = 0;
-int num_buf_aio = 0;
-int num_aio_resv_start = 0;
-int aiod_timeout;
-int aiod_lifetime;
-
-int max_aio_per_proc = MAX_AIO_PER_PROC,
+static int max_aio_procs = MAX_AIO_PROCS;
+static int num_aio_procs = 0;
+static int target_aio_procs = TARGET_AIO_PROCS;
+static int max_queue_count = MAX_AIO_QUEUE;
+static int num_queue_count = 0;
+static int num_buf_aio = 0;
+static int num_aio_resv_start = 0;
+static int aiod_timeout;
+static int aiod_lifetime;
+
+static int max_aio_per_proc = MAX_AIO_PER_PROC,
max_aio_queue_per_proc=MAX_AIO_QUEUE_PER_PROC;
-int max_buf_aio = MAX_BUF_AIO;
+static int max_buf_aio = MAX_BUF_AIO;
SYSCTL_NODE(_vfs, OID_AUTO, aio, CTLFLAG_RW, 0, "AIO mgmt");
@@ -222,10 +222,10 @@ struct kaioinfo {
event */
-TAILQ_HEAD (,aioproclist) aio_freeproc, aio_activeproc;
-TAILQ_HEAD(,aiocblist) aio_jobs; /* Async job list */
-TAILQ_HEAD(,aiocblist) aio_bufjobs; /* Phys I/O job list */
-TAILQ_HEAD(,aiocblist) aio_freejobs; /* Pool of free jobs */
+static TAILQ_HEAD (,aioproclist) aio_freeproc, aio_activeproc;
+static TAILQ_HEAD(,aiocblist) aio_jobs; /* Async job list */
+static TAILQ_HEAD(,aiocblist) aio_bufjobs; /* Phys I/O job list */
+static TAILQ_HEAD(,aiocblist) aio_freejobs; /* Pool of free jobs */
static void aio_init_aioinfo(struct proc *p) ;
static void aio_onceonly(void *) ;
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index c03a8f8..51b49ba 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -11,7 +11,7 @@
* 2. Absolutely no warranty of function or purpose is made by the author
* John S. Dyson.
*
- * $Id: vfs_bio.c,v 1.148 1998/02/04 22:32:39 eivind Exp $
+ * $Id: vfs_bio.c,v 1.149 1998/02/06 12:13:29 eivind Exp $
*/
/*
@@ -65,7 +65,7 @@ SYSINIT_KT(update, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start, &up_kp)
struct buf *buf; /* buffer header pool */
struct swqueue bswlist;
-int count_lock_queue __P((void));
+static int count_lock_queue __P((void));
static void vm_hold_free_pages(struct buf * bp, vm_offset_t from,
vm_offset_t to);
static void vm_hold_load_pages(struct buf * bp, vm_offset_t from,
@@ -105,7 +105,8 @@ static vm_offset_t bogus_offset;
static int bufspace, maxbufspace, vmiospace, maxvmiobufspace,
bufmallocspace, maxbufmallocspace;
-int numdirtybuffers, lodirtybuffers, hidirtybuffers;
+int numdirtybuffers;
+static int lodirtybuffers, hidirtybuffers;
static int numfreebuffers, lofreebuffers, hifreebuffers;
static int kvafreespace;
@@ -1972,7 +1973,7 @@ biodone(register struct buf * bp)
splx(s);
}
-int
+static int
count_lock_queue()
{
int count;
@@ -1986,7 +1987,7 @@ count_lock_queue()
return (count);
}
-int vfs_update_interval = 30;
+static int vfs_update_interval = 30;
static void
vfs_update()
diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c
index 4a103be..56fb1b9 100644
--- a/sys/kern/vfs_conf.c
+++ b/sys/kern/vfs_conf.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94
- * $Id: vfs_conf.c,v 1.19 1997/12/01 11:34:41 julian Exp $
+ * $Id: vfs_conf.c,v 1.20 1998/01/09 03:21:01 eivind Exp $
*/
/*
@@ -70,7 +70,7 @@ MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount struct");
/*
* These define the root filesystem, device, and root filesystem type.
*/
-struct mount *rootfs;
+static struct mount *rootfs;
struct vnode *rootvnode;
char *mountrootfsname;
#ifdef BOOTP
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 376b833..e764907 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
- * $Id: vfs_subr.c,v 1.130 1998/02/06 12:13:31 eivind Exp $
+ * $Id: vfs_subr.c,v 1.131 1998/02/07 08:44:31 kato Exp $
*/
/*
@@ -103,7 +103,7 @@ int vttoif_tab[9] = {
(bp)->b_vnbufs.le_next = NOLIST; \
}
-TAILQ_HEAD(freelst, vnode) vnode_free_list; /* vnode free list */
+static TAILQ_HEAD(freelst, vnode) vnode_free_list; /* vnode free list */
struct tobefreelist vnode_tobefree_list; /* vnode free list */
static u_long wantfreevnodes = 25;
@@ -118,7 +118,7 @@ struct mntlist mountlist; /* mounted filesystem list */
struct simplelock mountlist_slock;
static struct simplelock mntid_slock;
struct simplelock mntvnode_slock;
-struct simplelock vnode_free_list_slock;
+static struct simplelock vnode_free_list_slock;
static struct simplelock spechash_slock;
struct nfs_public nfs_pub; /* publicly exported FS */
static vm_zone_t vnode_zone;
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index 1982913..c6aaacb 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.30 1997/10/16 10:47:57 phk Exp $
+ * $Id: vfs_init.c,v 1.31 1997/10/26 20:26:33 phk Exp $
*/
@@ -64,7 +64,7 @@ MALLOC_DEFINE(M_VNODE, "vnodes", "Dynamically allocated vnodes");
#define DODEBUG(A)
#endif
-struct vfsconf void_vfsconf;
+static struct vfsconf void_vfsconf;
extern struct linker_set vfs_opv_descs_;
#define vfs_opv_descs ((struct vnodeopv_desc **)vfs_opv_descs_.ls_items)
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 4a103be..56fb1b9 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_conf.c 8.8 (Berkeley) 3/31/94
- * $Id: vfs_conf.c,v 1.19 1997/12/01 11:34:41 julian Exp $
+ * $Id: vfs_conf.c,v 1.20 1998/01/09 03:21:01 eivind Exp $
*/
/*
@@ -70,7 +70,7 @@ MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount struct");
/*
* These define the root filesystem, device, and root filesystem type.
*/
-struct mount *rootfs;
+static struct mount *rootfs;
struct vnode *rootvnode;
char *mountrootfsname;
#ifdef BOOTP
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 376b833..e764907 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
- * $Id: vfs_subr.c,v 1.130 1998/02/06 12:13:31 eivind Exp $
+ * $Id: vfs_subr.c,v 1.131 1998/02/07 08:44:31 kato Exp $
*/
/*
@@ -103,7 +103,7 @@ int vttoif_tab[9] = {
(bp)->b_vnbufs.le_next = NOLIST; \
}
-TAILQ_HEAD(freelst, vnode) vnode_free_list; /* vnode free list */
+static TAILQ_HEAD(freelst, vnode) vnode_free_list; /* vnode free list */
struct tobefreelist vnode_tobefree_list; /* vnode free list */
static u_long wantfreevnodes = 25;
@@ -118,7 +118,7 @@ struct mntlist mountlist; /* mounted filesystem list */
struct simplelock mountlist_slock;
static struct simplelock mntid_slock;
struct simplelock mntvnode_slock;
-struct simplelock vnode_free_list_slock;
+static struct simplelock vnode_free_list_slock;
static struct simplelock spechash_slock;
struct nfs_public nfs_pub; /* publicly exported FS */
static vm_zone_t vnode_zone;
diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c
index 3324a4a..2cbe479 100644
--- a/sys/miscfs/fdesc/fdesc_vnops.c
+++ b/sys/miscfs/fdesc/fdesc_vnops.c
@@ -35,7 +35,7 @@
*
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
*
- * $Id: fdesc_vnops.c,v 1.32 1997/10/26 20:55:14 phk Exp $
+ * $Id: fdesc_vnops.c,v 1.33 1997/10/27 13:33:38 bde Exp $
*/
/*
@@ -77,8 +77,8 @@ FD_STDIN, FD_STDOUT, FD_STDERR must be a sequence n, n+1, n+2
#define NFDCACHE 4
#define FD_NHASH(ix) \
(&fdhashtbl[(ix) & fdhash])
-LIST_HEAD(fdhashhead, fdescnode) *fdhashtbl;
-u_long fdhash;
+static LIST_HEAD(fdhashhead, fdescnode) *fdhashtbl;
+static u_long fdhash;
static int fdesc_attr __P((int fd, struct vattr *vap, struct ucred *cred,
struct proc *p));
diff --git a/sys/miscfs/nullfs/null_subr.c b/sys/miscfs/nullfs/null_subr.c
index de64494..7244d05 100644
--- a/sys/miscfs/nullfs/null_subr.c
+++ b/sys/miscfs/nullfs/null_subr.c
@@ -35,7 +35,7 @@
*
* @(#)null_subr.c 8.7 (Berkeley) 5/14/95
*
- * $Id: null_subr.c,v 1.15 1998/02/04 22:32:46 eivind Exp $
+ * $Id: null_subr.c,v 1.16 1998/02/06 12:13:36 eivind Exp $
*/
#include "opt_debug_nullfs.h"
@@ -61,8 +61,8 @@
#define NULL_NHASH(vp) \
(&null_node_hashtbl[(((u_long)vp)>>LOG2_SIZEVNODE) & null_node_hash])
-LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl;
-u_long null_node_hash;
+static LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl;
+static u_long null_node_hash;
static int null_node_alloc __P((struct mount *mp, struct vnode *lowervp,
struct vnode **vpp));
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c
index 932b6c1..a346ae7 100644
--- a/sys/miscfs/procfs/procfs_vnops.c
+++ b/sys/miscfs/procfs/procfs_vnops.c
@@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
*
- * $Id: procfs_vnops.c,v 1.53 1998/02/04 22:32:49 eivind Exp $
+ * $Id: procfs_vnops.c,v 1.54 1998/02/06 12:13:42 eivind Exp $
*/
/*
@@ -80,7 +80,7 @@ static int procfs_setattr __P((struct vop_setattr_args *));
* process-specific sub-directories. It is
* used in procfs_lookup and procfs_readdir
*/
-struct proc_target {
+static struct proc_target {
u_char pt_type;
u_char pt_namlen;
char *pt_name;
diff --git a/sys/miscfs/umapfs/umap_subr.c b/sys/miscfs/umapfs/umap_subr.c
index 549d3e4..dd93078 100644
--- a/sys/miscfs/umapfs/umap_subr.c
+++ b/sys/miscfs/umapfs/umap_subr.c
@@ -35,7 +35,7 @@
*
* @(#)umap_subr.c 8.9 (Berkeley) 5/14/95
*
- * $Id: umap_subr.c,v 1.11 1997/08/02 14:32:24 bde Exp $
+ * $Id: umap_subr.c,v 1.12 1998/02/07 01:36:24 kato Exp $
*/
#include <sys/param.h>
@@ -59,8 +59,8 @@
#define UMAP_NHASH(vp) \
(&umap_node_hashtbl[(((u_long)vp)>>LOG2_SIZEVNODE) & umap_node_hash])
-LIST_HEAD(umap_node_hashhead, umap_node) *umap_node_hashtbl;
-u_long umap_node_hash;
+static LIST_HEAD(umap_node_hashhead, umap_node) *umap_node_hashtbl;
+static u_long umap_node_hash;
static u_long umap_findid __P((u_long id, u_long map[][2], int nentries));
static int umap_node_alloc __P((struct mount *mp, struct vnode *lowervp,
diff --git a/sys/msdosfs/msdosfs_conv.c b/sys/msdosfs/msdosfs_conv.c
index e35f52b..59f4d2c 100644
--- a/sys/msdosfs/msdosfs_conv.c
+++ b/sys/msdosfs/msdosfs_conv.c
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: msdosfs_conv.c,v 1.13 1997/02/22 09:40:46 peter Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.6.2.1 1994/08/30 02:27:57 cgd Exp $ */
/*
@@ -51,10 +51,10 @@ static u_short leapyear[] = {
* Variables used to remember parts of the last time conversion. Maybe we
* can avoid a full conversion.
*/
-u_long lasttime;
-u_long lastday;
-u_short lastddate;
-u_short lastdtime;
+static u_long lasttime;
+static u_long lastday;
+static u_short lastddate;
+static u_short lastdtime;
/*
* Convert the unix version of time to dos's idea of time to be used in
@@ -127,8 +127,8 @@ unix2dostime(tsp, ddp, dtp)
*/
#define SECONDSTO1980 (((8 * 365) + (2 * 366)) * (24 * 60 * 60))
-u_short lastdosdate;
-u_long lastseconds;
+static u_short lastdosdate;
+static u_long lastseconds;
/*
* Convert from dos' idea of time to unix'. This will probably only be
diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c
index 4b961f5..81e0699 100644
--- a/sys/msdosfs/msdosfs_denode.c
+++ b/sys/msdosfs/msdosfs_denode.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_denode.c,v 1.29 1998/02/04 22:33:00 eivind Exp $ */
+/* $Id: msdosfs_denode.c,v 1.30 1998/02/06 12:13:46 eivind Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */
/*-
@@ -68,8 +68,8 @@
static MALLOC_DEFINE(M_MSDOSFSNODE, "MSDOSFS node", "MSDOSFS vnode private part");
-struct denode **dehashtbl;
-u_long dehash; /* size of hash table - 1 */
+static struct denode **dehashtbl;
+static u_long dehash; /* size of hash table - 1 */
#define DEHASH(dev, deno) (dehashtbl[((dev) + (deno)) & dehash])
static struct simplelock dehash_slock;
diff --git a/sys/msdosfs/msdosfs_fat.c b/sys/msdosfs/msdosfs_fat.c
index f3c2f5f..bb25ec2 100644
--- a/sys/msdosfs/msdosfs_fat.c
+++ b/sys/msdosfs/msdosfs_fat.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_fat.c,v 1.14 1998/02/04 22:33:00 eivind Exp $ */
+/* $Id: msdosfs_fat.c,v 1.15 1998/02/06 12:13:46 eivind Exp $ */
/* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */
/*-
@@ -69,15 +69,15 @@
/*
* Fat cache stats.
*/
-int fc_fileextends; /* # of file extends */
-int fc_lfcempty; /* # of time last file cluster cache entry
+static int fc_fileextends; /* # of file extends */
+static int fc_lfcempty; /* # of time last file cluster cache entry
* was empty */
-int fc_bmapcalls; /* # of times pcbmap was called */
+static int fc_bmapcalls; /* # of times pcbmap was called */
#define LMMAX 20
-int fc_lmdistance[LMMAX]; /* counters for how far off the last
+static int fc_lmdistance[LMMAX];/* counters for how far off the last
* cluster mapped entry was. */
-int fc_largedistance; /* off by more than LMMAX */
+static int fc_largedistance; /* off by more than LMMAX */
/* Byte offset in FAT on filesystem pmp, cluster cn */
#define FATOFS(pmp, cn) (FAT12(pmp) ? (cn) * 3 / 2 : (cn) * 2)
diff --git a/sys/net/if_media.c b/sys/net/if_media.c
index 51e6df8..ee12880 100644
--- a/sys/net/if_media.c
+++ b/sys/net/if_media.c
@@ -1,5 +1,5 @@
/* $NetBSD: if_media.c,v 1.1 1997/03/17 02:55:15 thorpej Exp $ */
-/* $Id: if_media.c,v 1.4 1998/02/04 22:33:03 eivind Exp $ */
+/* $Id: if_media.c,v 1.5 1998/02/06 12:13:48 eivind Exp $ */
/*
* Copyright (c) 1997
@@ -62,7 +62,7 @@
* Useful for debugging newly-ported drivers.
*/
-struct ifmedia_entry *ifmedia_match __P((struct ifmedia *ifm,
+static struct ifmedia_entry *ifmedia_match __P((struct ifmedia *ifm,
int flags, int mask));
#ifdef IFMEDIA_DEBUG
@@ -327,7 +327,7 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd)
* Find media entry matching a given ifm word.
*
*/
-struct ifmedia_entry *
+static struct ifmedia_entry *
ifmedia_match(ifm, target, mask)
struct ifmedia *ifm;
int target;
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index 695627c..f72d814 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
- * $Id: if_sl.c,v 1.64 1997/12/19 19:39:01 ache Exp $
+ * $Id: if_sl.c,v 1.65 1998/01/08 23:41:29 eivind Exp $
*/
/*
@@ -174,7 +174,7 @@ PSEUDO_SET(slattach, if_sl);
#define ABT_COUNT 3 /* count of escapes for abort */
#define ABT_WINDOW (ABT_COUNT*2+2) /* in seconds - time to count */
-struct sl_softc sl_softc[NSL];
+static struct sl_softc sl_softc[NSL];
#define FRAME_END 0xc0 /* Frame End */
#define FRAME_ESCAPE 0xdb /* Frame Esc */
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index d5f449f..b457947 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -17,7 +17,7 @@
*
* From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997
*
- * $Id: if_spppsubr.c,v 1.30 1998/01/01 21:27:18 gj Exp $
+ * $Id: if_spppsubr.c,v 1.31 1998/01/08 23:41:31 eivind Exp $
*/
#include "opt_inet.h"
@@ -335,7 +335,7 @@ static void sppp_qflush(struct ifqueue *ifq);
static void sppp_set_ip_addr(struct sppp *sp, u_long src);
/* our control protocol descriptors */
-const struct cp lcp = {
+static const struct cp lcp = {
PPP_LCP, IDX_LCP, CP_LCP, "lcp",
sppp_lcp_up, sppp_lcp_down, sppp_lcp_open, sppp_lcp_close,
sppp_lcp_TO, sppp_lcp_RCR, sppp_lcp_RCN_rej, sppp_lcp_RCN_nak,
@@ -343,7 +343,7 @@ const struct cp lcp = {
sppp_lcp_scr
};
-const struct cp ipcp = {
+static const struct cp ipcp = {
PPP_IPCP, IDX_IPCP, CP_NCP, "ipcp",
sppp_ipcp_up, sppp_ipcp_down, sppp_ipcp_open, sppp_ipcp_close,
sppp_ipcp_TO, sppp_ipcp_RCR, sppp_ipcp_RCN_rej, sppp_ipcp_RCN_nak,
@@ -351,7 +351,7 @@ const struct cp ipcp = {
sppp_ipcp_scr
};
-const struct cp pap = {
+static const struct cp pap = {
PPP_PAP, IDX_PAP, CP_AUTH, "pap",
sppp_null, sppp_null, sppp_pap_open, sppp_pap_close,
sppp_pap_TO, 0, 0, 0,
@@ -359,7 +359,7 @@ const struct cp pap = {
sppp_pap_scr
};
-const struct cp chap = {
+static const struct cp chap = {
PPP_CHAP, IDX_CHAP, CP_AUTH, "chap",
sppp_null, sppp_null, sppp_chap_open, sppp_chap_close,
sppp_chap_TO, 0, 0, 0,
@@ -367,7 +367,7 @@ const struct cp chap = {
sppp_chap_scr
};
-const struct cp *cps[IDX_COUNT] = {
+static const struct cp *cps[IDX_COUNT] = {
&lcp, /* IDX_LCP */
&ipcp, /* IDX_IPCP */
&pap, /* IDX_PAP */
diff --git a/sys/net/route.c b/sys/net/route.c
index f3e7b04..ab1e8ea 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)route.c 8.2 (Berkeley) 11/15/93
- * $Id: route.c,v 1.47 1998/02/04 22:33:03 eivind Exp $
+ * $Id: route.c,v 1.48 1998/02/06 12:13:48 eivind Exp $
*/
#include "opt_inet.h"
@@ -724,7 +724,7 @@ rt_fixdelete(rn, vp)
* changes this way.
*/
#ifdef DEBUG
-int rtfcdebug = 0;
+static int rtfcdebug = 0;
#endif
static int
diff --git a/sys/net/zlib.c b/sys/net/zlib.c
index 15dc7fd..7681c2a 100644
--- a/sys/net/zlib.c
+++ b/sys/net/zlib.c
@@ -11,7 +11,7 @@
* - added Z_PACKET_FLUSH (see zlib.h for details)
* - added inflateIncomp
*
- * $Id: zlib.c,v 1.3 1997/08/19 14:10:48 peter Exp $
+ * $Id: zlib.c,v 1.4 1997/09/01 02:18:13 bde Exp $
*/
/*
@@ -4581,7 +4581,7 @@ z_stream *z;
char *zlib_version = ZLIB_VERSION;
-char *z_errmsg[] = {
+static char *z_errmsg[] = {
"stream end", /* Z_STREAM_END 1 */
"", /* Z_OK 0 */
"file error", /* Z_ERRNO (-1) */
diff --git a/sys/netatalk/aarp.c b/sys/netatalk/aarp.c
index 63e4d89..702f088 100644
--- a/sys/netatalk/aarp.c
+++ b/sys/netatalk/aarp.c
@@ -30,8 +30,8 @@ static void at_aarpinput( struct arpcom *ac, struct mbuf *m);
#define AARPTAB_BSIZ 9
#define AARPTAB_NB 19
#define AARPTAB_SIZE (AARPTAB_BSIZ * AARPTAB_NB)
-struct aarptab aarptab[AARPTAB_SIZE];
-int aarptab_size = AARPTAB_SIZE;
+static struct aarptab aarptab[AARPTAB_SIZE];
+static int aarptab_size = AARPTAB_SIZE;
#define AARPTAB_HASH(a) \
((((a).s_net << 8 ) + (a).s_node ) % AARPTAB_NB )
@@ -55,7 +55,7 @@ int aarptab_size = AARPTAB_SIZE;
extern u_char etherbroadcastaddr[6];
# endif __FreeBSD__
-u_char atmulticastaddr[ 6 ] = {
+static u_char atmulticastaddr[ 6 ] = {
0x09, 0x00, 0x07, 0xff, 0xff, 0xff,
};
diff --git a/sys/netatalk/ddp_pcb.c b/sys/netatalk/ddp_pcb.c
index 53e7dce..45c9b2eb4 100644
--- a/sys/netatalk/ddp_pcb.c
+++ b/sys/netatalk/ddp_pcb.c
@@ -30,8 +30,8 @@ static int at_pcballoc(struct socket *so);
struct ddpcb *ddp_ports[ ATPORT_LAST ];
struct ddpcb *ddpcb = NULL;
-u_long ddp_sendspace = DDP_MAXSZ; /* Max ddp size + 1 (ddp_type) */
-u_long ddp_recvspace = 10 * ( 587 + sizeof( struct sockaddr_at ));
+static u_long ddp_sendspace = DDP_MAXSZ; /* Max ddp size + 1 (ddp_type) */
+static u_long ddp_recvspace = 10 * ( 587 + sizeof( struct sockaddr_at ));
static int
diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c
index 53e7dce..45c9b2eb4 100644
--- a/sys/netatalk/ddp_usrreq.c
+++ b/sys/netatalk/ddp_usrreq.c
@@ -30,8 +30,8 @@ static int at_pcballoc(struct socket *so);
struct ddpcb *ddp_ports[ ATPORT_LAST ];
struct ddpcb *ddpcb = NULL;
-u_long ddp_sendspace = DDP_MAXSZ; /* Max ddp size + 1 (ddp_type) */
-u_long ddp_recvspace = 10 * ( 587 + sizeof( struct sockaddr_at ));
+static u_long ddp_sendspace = DDP_MAXSZ; /* Max ddp size + 1 (ddp_type) */
+static u_long ddp_recvspace = 10 * ( 587 + sizeof( struct sockaddr_at ));
static int
diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c
index 86b6368..21011c2 100644
--- a/sys/netinet/ip_fw.c
+++ b/sys/netinet/ip_fw.c
@@ -12,7 +12,7 @@
*
* This software is provided ``AS IS'' without any warranties of any kind.
*
- * $Id: ip_fw.c,v 1.75 1998/02/06 02:45:54 alex Exp $
+ * $Id: ip_fw.c,v 1.76 1998/02/06 12:13:51 eivind Exp $
*/
/*
@@ -60,7 +60,7 @@ static int fw_verbose_limit = IPFIREWALL_VERBOSE_LIMIT;
static int fw_verbose_limit = 0;
#endif
-LIST_HEAD (ip_fw_head, ip_fw_chain) ip_fw_chain;
+static LIST_HEAD (ip_fw_head, ip_fw_chain) ip_fw_chain;
static MALLOC_DEFINE(M_IPFW, "IpFw/IpAcct", "IpFw/IpAcct chain's");
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index b8068d3..6140dfb 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -9,7 +9,7 @@
* Modified by Bill Fenner, PARC, April 1995
*
* MROUTING Revision: 3.5
- * $Id: ip_mroute.c,v 1.43 1998/02/04 22:33:08 eivind Exp $
+ * $Id: ip_mroute.c,v 1.44 1998/02/06 12:13:52 eivind Exp $
*/
#include "opt_mrouting.h"
@@ -199,9 +199,9 @@ ip_rsvp_force_done(so)
*/
#ifndef MROUTE_LKM
struct socket *ip_mrouter = NULL;
-struct mrtstat mrtstat;
+static struct mrtstat mrtstat;
-int ip_mrtproto = IGMP_DVMRP; /* for netstat only */
+static int ip_mrtproto = IGMP_DVMRP; /* for netstat only */
#else /* MROUTE_LKM */
extern void X_ipip_input __P((struct mbuf *m, int iphlen));
extern struct mrtstat mrtstat;
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c
index 42cd9b4..c04b420 100644
--- a/sys/netipx/ipx_input.c
+++ b/sys/netipx/ipx_input.c
@@ -33,7 +33,7 @@
*
* @(#)ipx_input.c
*
- * $Id: ipx_input.c,v 1.13 1997/05/10 09:58:52 jhay Exp $
+ * $Id: ipx_input.c,v 1.14 1997/06/26 19:35:46 jhay Exp $
*/
#include <sys/param.h>
@@ -85,7 +85,7 @@ struct ipxpcb ipxpcb;
struct ipxpcb ipxrawpcb;
struct ifqueue ipxintrq;
-int ipxqmaxlen = IFQ_MAXLEN;
+static int ipxqmaxlen = IFQ_MAXLEN;
long ipx_pexseq;
@@ -328,8 +328,8 @@ ipx_ctlinput(cmd, arg_as_sa, dummy)
* have a way to return errors to the sender.
*/
-struct route ipx_droute;
-struct route ipx_sroute;
+static struct route ipx_droute;
+static struct route ipx_sroute;
static void
ipx_forward(m)
diff --git a/sys/netipx/ipx_ip.c b/sys/netipx/ipx_ip.c
index 73330a2..c5d9bf7 100644
--- a/sys/netipx/ipx_ip.c
+++ b/sys/netipx/ipx_ip.c
@@ -33,7 +33,7 @@
*
* @(#)ipx_ip.c
*
- * $Id: ipx_ip.c,v 1.18 1997/12/21 16:35:12 bde Exp $
+ * $Id: ipx_ip.c,v 1.19 1998/01/08 23:41:56 eivind Exp $
*/
/*
@@ -72,8 +72,10 @@
#include <netipx/ipx_ip.h>
#include <netipx/ipx_var.h>
-struct ifnet ipxipif;
-struct ifnet_en *ipxip_list; /* list of all hosts and gateways or broadcast addrs */
+static struct ifnet ipxipif;
+
+/* list of all hosts and gateways or broadcast addrs */
+static struct ifnet_en *ipxip_list;
static struct ifnet_en *ipxipattach(void);
static int ipxip_free(struct ifnet *ifp);
@@ -156,9 +158,9 @@ ipxipioctl(ifp, cmd, data)
return (error);
}
-struct mbuf *ipxip_badlen;
-struct mbuf *ipxip_lastin;
-int ipxip_hold_input;
+static struct mbuf *ipxip_badlen;
+static struct mbuf *ipxip_lastin;
+static int ipxip_hold_input;
void
ipxip_input(m, hlen)
@@ -311,7 +313,7 @@ struct ifnet *ifp;
panic("ipxip_start called\n");
}
-struct ifreq ifr_ipxip = {"ipxip0"};
+static struct ifreq ifr_ipxip = {"ipxip0"};
int
ipxip_route(so, m, p)
diff --git a/sys/netipx/ipx_outputfl.c b/sys/netipx/ipx_outputfl.c
index 004a6de..c540aa7 100644
--- a/sys/netipx/ipx_outputfl.c
+++ b/sys/netipx/ipx_outputfl.c
@@ -33,7 +33,7 @@
*
* @(#)ipx_outputfl.c
*
- * $Id: ipx_outputfl.c,v 1.8 1997/06/26 19:35:51 jhay Exp $
+ * $Id: ipx_outputfl.c,v 1.9 1997/07/01 00:22:49 bde Exp $
*/
#include <sys/param.h>
@@ -52,7 +52,7 @@
#include <machine/mtpr.h>
#endif
-int ipx_copy_output = 0;
+static int ipx_copy_output = 0;
int
ipx_outputfl(m0, ro, flags)
diff --git a/sys/netipx/ipx_pcb.c b/sys/netipx/ipx_pcb.c
index e375f3b..f7e00a0 100644
--- a/sys/netipx/ipx_pcb.c
+++ b/sys/netipx/ipx_pcb.c
@@ -33,7 +33,7 @@
*
* @(#)ipx_pcb.c
*
- * $Id: ipx_pcb.c,v 1.12 1997/09/02 01:19:10 bde Exp $
+ * $Id: ipx_pcb.c,v 1.13 1997/10/28 15:58:56 bde Exp $
*/
#include <sys/param.h>
@@ -51,7 +51,7 @@
#include <netipx/ipx_pcb.h>
#include <netipx/ipx_var.h>
-struct ipx_addr zeroipx_addr;
+static struct ipx_addr zeroipx_addr;
int
ipx_pcballoc(so, head, p)
diff --git a/sys/netipx/ipx_proto.c b/sys/netipx/ipx_proto.c
index ce20687..bbb6b93 100644
--- a/sys/netipx/ipx_proto.c
+++ b/sys/netipx/ipx_proto.c
@@ -33,7 +33,7 @@
*
* @(#)ipx_proto.c
*
- * $Id: ipx_proto.c,v 1.11 1997/06/26 19:35:55 jhay Exp $
+ * $Id: ipx_proto.c,v 1.12 1997/12/15 20:31:14 eivind Exp $
*/
#include "opt_ipx.h"
@@ -101,7 +101,7 @@ static struct protosw ipxsw[] = {
#endif
};
-struct domain ipxdomain =
+static struct domain ipxdomain =
{ AF_IPX, "network systems", 0, 0, 0,
ipxsw, &ipxsw[sizeof(ipxsw)/sizeof(ipxsw[0])], 0,
rn_inithead, 16, sizeof(struct sockaddr_ipx)};
diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c
index e65548a..3c15319 100644
--- a/sys/netipx/ipx_usrreq.c
+++ b/sys/netipx/ipx_usrreq.c
@@ -33,7 +33,7 @@
*
* @(#)ipx_usrreq.c
*
- * $Id: ipx_usrreq.c,v 1.17 1997/09/14 03:10:41 peter Exp $
+ * $Id: ipx_usrreq.c,v 1.18 1997/12/15 20:31:15 eivind Exp $
*/
#include "opt_ipx.h"
@@ -63,10 +63,10 @@
* IPX protocol implementation.
*/
-int ipxsendspace = IPXSNDQ;
+static int ipxsendspace = IPXSNDQ;
SYSCTL_INT(_net_ipx_ipx, OID_AUTO, ipxsendspace, CTLFLAG_RW,
&ipxsendspace, 0, "");
-int ipxrecvspace = IPXRCVQ;
+static int ipxrecvspace = IPXRCVQ;
SYSCTL_INT(_net_ipx_ipx, OID_AUTO, ipxrecvspace, CTLFLAG_RW,
&ipxrecvspace, 0, "");
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c
index 2d87df0..cd8149b 100644
--- a/sys/netipx/spx_usrreq.c
+++ b/sys/netipx/spx_usrreq.c
@@ -33,7 +33,7 @@
*
* @(#)spx_usrreq.h
*
- * $Id: spx_usrreq.c,v 1.16 1997/09/02 01:19:15 bde Exp $
+ * $Id: spx_usrreq.c,v 1.17 1997/09/14 03:10:41 peter Exp $
*/
#include <sys/param.h>
@@ -59,20 +59,20 @@
/*
* SPX protocol implementation.
*/
-u_short spx_iss;
-u_short spx_newchecks[50];
-int spx_hardnosed;
-int spx_use_delack = 0;
-int traceallspxs = 0;
-struct spx spx_savesi;
-struct spx_istat spx_istat;
+static u_short spx_iss;
+static u_short spx_newchecks[50];
+static int spx_hardnosed;
+static int spx_use_delack = 0;
+static int traceallspxs = 0;
+static struct spx spx_savesi;
+static struct spx_istat spx_istat;
/* Following was struct spxstat spxstat; */
#ifndef spxstat
#define spxstat spx_istat.newstats
#endif
-int spx_backoff[SPX_MAXRXTSHIFT+1] =
+static int spx_backoff[SPX_MAXRXTSHIFT+1] =
{ 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 };
static void spx_abort(struct ipxpcb *ipxp);
@@ -329,7 +329,7 @@ bad:
m_freem(m);
}
-int spxrexmtthresh = 3;
+static int spxrexmtthresh = 3;
/*
* This is structurally similar to the tcp reassembly routine
@@ -1133,7 +1133,7 @@ send:
return (0);
}
-int spx_do_persist_panics = 0;
+static int spx_do_persist_panics = 0;
static void
spx_setpersist(cb)
diff --git a/sys/netnatm/natm.c b/sys/netnatm/natm.c
index 877ed62..d27b102 100644
--- a/sys/netnatm/natm.c
+++ b/sys/netnatm/natm.c
@@ -54,11 +54,11 @@
#include <netnatm/natm.h>
-u_long natm5_sendspace = 16*1024;
-u_long natm5_recvspace = 16*1024;
+static u_long natm5_sendspace = 16*1024;
+static u_long natm5_recvspace = 16*1024;
-u_long natm0_sendspace = 16*1024;
-u_long natm0_recvspace = 16*1024;
+static u_long natm0_sendspace = 16*1024;
+static u_long natm0_recvspace = 16*1024;
/*
* user requests
diff --git a/sys/netnatm/natm_proto.c b/sys/netnatm/natm_proto.c
index 9f8fc52..58ecaf1 100644
--- a/sys/netnatm/natm_proto.c
+++ b/sys/netnatm/natm_proto.c
@@ -53,7 +53,7 @@ extern struct domain natmdomain;
static void natm_init __P((void));
-struct protosw natmsw[] = {
+static struct protosw natmsw[] = {
{ SOCK_STREAM, &natmdomain, PROTO_NATMAAL5, PR_CONNREQUIRED,
0, 0, 0, 0,
#ifdef FREEBSD_USRREQS
@@ -98,13 +98,13 @@ struct protosw natmsw[] = {
},
};
-struct domain natmdomain =
+static struct domain natmdomain =
{ AF_NATM, "natm", natm_init, 0, 0,
natmsw, &natmsw[sizeof(natmsw)/sizeof(natmsw[0])], 0,
0, 0, 0};
struct ifqueue natmintrq; /* natm packet input queue */
-int natmqmaxlen = IFQ_MAXLEN; /* max # of packets on queue */
+static int natmqmaxlen = IFQ_MAXLEN; /* max # of packets on queue */
#ifdef NATM_STAT
u_int natm_sodropcnt = 0; /* # mbufs dropped due to full sb */
u_int natm_sodropbytes = 0; /* # of bytes dropped */
diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c
index 1712a80..891b935 100644
--- a/sys/nfs/bootp_subr.c
+++ b/sys/nfs/bootp_subr.c
@@ -1,4 +1,4 @@
-/* $Id: bootp_subr.c,v 1.7 1998/01/09 03:21:07 eivind Exp $ */
+/* $Id: bootp_subr.c,v 1.8 1998/01/18 18:46:20 tegge Exp $ */
/*
* Copyright (c) 1995 Gordon Ross, Adam Glass
@@ -129,14 +129,15 @@ void bootpboot_p_rtlist(void);
void bootpboot_p_iflist(void);
#endif
-int bootpc_call(struct bootp_packet *call,
- struct bootp_packet *reply,
- struct proc *procp);
+static int bootpc_call(struct bootp_packet *call,
+ struct bootp_packet *reply,
+ struct proc *procp);
-int bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
+static int bootpc_fakeup_interface(struct ifreq *ireq,
+ struct socket *so,
struct proc *procp);
-int
+static int
bootpc_adjust_interface(struct ifreq *ireq,struct socket *so,
struct sockaddr_in *myaddr,
struct sockaddr_in *netmask,
@@ -252,7 +253,7 @@ void bootpboot_p_iflist(void)
}
#endif
-int
+static int
bootpc_call(call,reply,procp)
struct bootp_packet *call;
struct bootp_packet *reply; /* output */
@@ -421,7 +422,7 @@ bootpc_call(call,reply,procp)
return error;
}
-int
+static int
bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
struct proc *procp)
{
@@ -511,7 +512,7 @@ bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
return error;
}
-int
+static int
bootpc_adjust_interface(struct ifreq *ireq,struct socket *so,
struct sockaddr_in *myaddr,
struct sockaddr_in *netmask,
diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c
index 1c6397b..48d0baf 100644
--- a/sys/nfs/nfs_node.c
+++ b/sys/nfs/nfs_node.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_node.c 8.6 (Berkeley) 5/22/95
- * $Id: nfs_node.c,v 1.22 1997/10/28 14:06:20 bde Exp $
+ * $Id: nfs_node.c,v 1.23 1997/12/27 02:56:33 bde Exp $
*/
@@ -56,8 +56,8 @@
static MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part");
-LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl;
-u_long nfsnodehash;
+static LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl;
+static u_long nfsnodehash;
#define TRUE 1
#define FALSE 0
@@ -102,7 +102,7 @@ nfs_hash(fhp, fhsize)
* In all cases, a pointer to a
* nfsnode structure is returned.
*/
-int nfs_node_hash_lock;
+static int nfs_node_hash_lock;
int
nfs_nget(mntp, fhp, fhsize, npp)
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index e24be24..19d09f4 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_serv.c,v 1.56 1998/02/04 22:33:14 eivind Exp $
+ * $Id: nfs_serv.c,v 1.57 1998/02/06 12:13:56 eivind Exp $
*/
/*
@@ -99,7 +99,7 @@ extern struct nfsstats nfsstats;
int nfsrvw_procrastinate = NFS_GATHERDELAY * 1000;
int nfsrvw_procrastinate_v3 = 0;
-int nfs_async;
+static int nfs_async;
SYSCTL_INT(_vfs_nfs, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0, "");
static int nfsrv_access __P((struct vnode *,int,struct ucred *,int,
diff --git a/sys/nfs/nfs_srvcache.c b/sys/nfs/nfs_srvcache.c
index 14eaedd..1731d8e 100644
--- a/sys/nfs/nfs_srvcache.c
+++ b/sys/nfs/nfs_srvcache.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_srvcache.c 8.3 (Berkeley) 3/30/95
- * $Id: nfs_srvcache.c,v 1.14 1997/08/16 19:15:58 wollman Exp $
+ * $Id: nfs_srvcache.c,v 1.15 1997/10/12 20:25:46 phk Exp $
*/
#ifndef NFS_NOSERVER
@@ -62,14 +62,14 @@
extern struct nfsstats nfsstats;
extern int nfsv2_procid[NFS_NPROCS];
-long numnfsrvcache;
+static long numnfsrvcache;
static long desirednfsrvcache = NFSRVCACHESIZ;
#define NFSRCHASH(xid) \
(&nfsrvhashtbl[((xid) + ((xid) >> 24)) & nfsrvhash])
-LIST_HEAD(nfsrvhash, nfsrvcache) *nfsrvhashtbl;
-TAILQ_HEAD(nfsrvlru, nfsrvcache) nfsrvlruhead;
-u_long nfsrvhash;
+static LIST_HEAD(nfsrvhash, nfsrvcache) *nfsrvhashtbl;
+static TAILQ_HEAD(nfsrvlru, nfsrvcache) nfsrvlruhead;
+static u_long nfsrvhash;
#define TRUE 1
#define FALSE 0
diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c
index 51fdeb8..ba460fc 100644
--- a/sys/nfs/nfs_syscalls.c
+++ b/sys/nfs/nfs_syscalls.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95
- * $Id: nfs_syscalls.c,v 1.34 1998/02/04 22:33:16 eivind Exp $
+ * $Id: nfs_syscalls.c,v 1.35 1998/02/06 12:13:57 eivind Exp $
*/
#include <sys/param.h>
@@ -747,7 +747,7 @@ done:
}
#endif /* NFS_NOSERVER */
-int nfs_defect = 0;
+static int nfs_defect = 0;
SYSCTL_INT(_vfs_nfs, OID_AUTO, defect, CTLFLAG_RW, &nfs_defect, 0, "");
/*
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 2776fac..f66d3ba 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
- * $Id: nfs_vfsops.c,v 1.52 1997/11/12 05:42:21 julian Exp $
+ * $Id: nfs_vfsops.c,v 1.53 1998/02/05 16:40:57 dyson Exp $
*/
#include <sys/param.h>
@@ -162,7 +162,7 @@ static int nfs_mountdiskless __P((char *, char *, int,
struct sockaddr_in *, struct nfs_args *,
struct proc *, struct vnode **,
struct mount **));
-void nfs_convert_diskless __P((void));
+static void nfs_convert_diskless __P((void));
static void nfs_convert_oargs __P((struct nfs_args *args,
struct onfs_args *oargs));
@@ -206,7 +206,8 @@ static void nfs_convert_oargs(args,oargs)
args->hostname = oargs->hostname;
}
-void nfs_convert_diskless()
+static void
+nfs_convert_diskless()
{
bcopy(&nfs_diskless.myif, &nfsv3_diskless.myif,
sizeof(struct ifaliasreq));
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c
index 1712a80..891b935 100644
--- a/sys/nfsclient/bootp_subr.c
+++ b/sys/nfsclient/bootp_subr.c
@@ -1,4 +1,4 @@
-/* $Id: bootp_subr.c,v 1.7 1998/01/09 03:21:07 eivind Exp $ */
+/* $Id: bootp_subr.c,v 1.8 1998/01/18 18:46:20 tegge Exp $ */
/*
* Copyright (c) 1995 Gordon Ross, Adam Glass
@@ -129,14 +129,15 @@ void bootpboot_p_rtlist(void);
void bootpboot_p_iflist(void);
#endif
-int bootpc_call(struct bootp_packet *call,
- struct bootp_packet *reply,
- struct proc *procp);
+static int bootpc_call(struct bootp_packet *call,
+ struct bootp_packet *reply,
+ struct proc *procp);
-int bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
+static int bootpc_fakeup_interface(struct ifreq *ireq,
+ struct socket *so,
struct proc *procp);
-int
+static int
bootpc_adjust_interface(struct ifreq *ireq,struct socket *so,
struct sockaddr_in *myaddr,
struct sockaddr_in *netmask,
@@ -252,7 +253,7 @@ void bootpboot_p_iflist(void)
}
#endif
-int
+static int
bootpc_call(call,reply,procp)
struct bootp_packet *call;
struct bootp_packet *reply; /* output */
@@ -421,7 +422,7 @@ bootpc_call(call,reply,procp)
return error;
}
-int
+static int
bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
struct proc *procp)
{
@@ -511,7 +512,7 @@ bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
return error;
}
-int
+static int
bootpc_adjust_interface(struct ifreq *ireq,struct socket *so,
struct sockaddr_in *myaddr,
struct sockaddr_in *netmask,
diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c
index 51fdeb8..ba460fc 100644
--- a/sys/nfsclient/nfs_nfsiod.c
+++ b/sys/nfsclient/nfs_nfsiod.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95
- * $Id: nfs_syscalls.c,v 1.34 1998/02/04 22:33:16 eivind Exp $
+ * $Id: nfs_syscalls.c,v 1.35 1998/02/06 12:13:57 eivind Exp $
*/
#include <sys/param.h>
@@ -747,7 +747,7 @@ done:
}
#endif /* NFS_NOSERVER */
-int nfs_defect = 0;
+static int nfs_defect = 0;
SYSCTL_INT(_vfs_nfs, OID_AUTO, defect, CTLFLAG_RW, &nfs_defect, 0, "");
/*
diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c
index 1c6397b..48d0baf 100644
--- a/sys/nfsclient/nfs_node.c
+++ b/sys/nfsclient/nfs_node.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_node.c 8.6 (Berkeley) 5/22/95
- * $Id: nfs_node.c,v 1.22 1997/10/28 14:06:20 bde Exp $
+ * $Id: nfs_node.c,v 1.23 1997/12/27 02:56:33 bde Exp $
*/
@@ -56,8 +56,8 @@
static MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part");
-LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl;
-u_long nfsnodehash;
+static LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl;
+static u_long nfsnodehash;
#define TRUE 1
#define FALSE 0
@@ -102,7 +102,7 @@ nfs_hash(fhp, fhsize)
* In all cases, a pointer to a
* nfsnode structure is returned.
*/
-int nfs_node_hash_lock;
+static int nfs_node_hash_lock;
int
nfs_nget(mntp, fhp, fhsize, npp)
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 2776fac..f66d3ba 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
- * $Id: nfs_vfsops.c,v 1.52 1997/11/12 05:42:21 julian Exp $
+ * $Id: nfs_vfsops.c,v 1.53 1998/02/05 16:40:57 dyson Exp $
*/
#include <sys/param.h>
@@ -162,7 +162,7 @@ static int nfs_mountdiskless __P((char *, char *, int,
struct sockaddr_in *, struct nfs_args *,
struct proc *, struct vnode **,
struct mount **));
-void nfs_convert_diskless __P((void));
+static void nfs_convert_diskless __P((void));
static void nfs_convert_oargs __P((struct nfs_args *args,
struct onfs_args *oargs));
@@ -206,7 +206,8 @@ static void nfs_convert_oargs(args,oargs)
args->hostname = oargs->hostname;
}
-void nfs_convert_diskless()
+static void
+nfs_convert_diskless()
{
bcopy(&nfs_diskless.myif, &nfsv3_diskless.myif,
sizeof(struct ifaliasreq));
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index e24be24..19d09f4 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_serv.c,v 1.56 1998/02/04 22:33:14 eivind Exp $
+ * $Id: nfs_serv.c,v 1.57 1998/02/06 12:13:56 eivind Exp $
*/
/*
@@ -99,7 +99,7 @@ extern struct nfsstats nfsstats;
int nfsrvw_procrastinate = NFS_GATHERDELAY * 1000;
int nfsrvw_procrastinate_v3 = 0;
-int nfs_async;
+static int nfs_async;
SYSCTL_INT(_vfs_nfs, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0, "");
static int nfsrv_access __P((struct vnode *,int,struct ucred *,int,
diff --git a/sys/nfsserver/nfs_srvcache.c b/sys/nfsserver/nfs_srvcache.c
index 14eaedd..1731d8e 100644
--- a/sys/nfsserver/nfs_srvcache.c
+++ b/sys/nfsserver/nfs_srvcache.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_srvcache.c 8.3 (Berkeley) 3/30/95
- * $Id: nfs_srvcache.c,v 1.14 1997/08/16 19:15:58 wollman Exp $
+ * $Id: nfs_srvcache.c,v 1.15 1997/10/12 20:25:46 phk Exp $
*/
#ifndef NFS_NOSERVER
@@ -62,14 +62,14 @@
extern struct nfsstats nfsstats;
extern int nfsv2_procid[NFS_NPROCS];
-long numnfsrvcache;
+static long numnfsrvcache;
static long desirednfsrvcache = NFSRVCACHESIZ;
#define NFSRCHASH(xid) \
(&nfsrvhashtbl[((xid) + ((xid) >> 24)) & nfsrvhash])
-LIST_HEAD(nfsrvhash, nfsrvcache) *nfsrvhashtbl;
-TAILQ_HEAD(nfsrvlru, nfsrvcache) nfsrvlruhead;
-u_long nfsrvhash;
+static LIST_HEAD(nfsrvhash, nfsrvcache) *nfsrvhashtbl;
+static TAILQ_HEAD(nfsrvlru, nfsrvcache) nfsrvlruhead;
+static u_long nfsrvhash;
#define TRUE 1
#define FALSE 0
diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c
index 51fdeb8..ba460fc 100644
--- a/sys/nfsserver/nfs_syscalls.c
+++ b/sys/nfsserver/nfs_syscalls.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95
- * $Id: nfs_syscalls.c,v 1.34 1998/02/04 22:33:16 eivind Exp $
+ * $Id: nfs_syscalls.c,v 1.35 1998/02/06 12:13:57 eivind Exp $
*/
#include <sys/param.h>
@@ -747,7 +747,7 @@ done:
}
#endif /* NFS_NOSERVER */
-int nfs_defect = 0;
+static int nfs_defect = 0;
SYSCTL_INT(_vfs_nfs, OID_AUTO, defect, CTLFLAG_RW, &nfs_defect, 0, "");
/*
diff --git a/sys/pc98/pc98/wfd.c b/sys/pc98/pc98/wfd.c
index 0250785..0683dba 100644
--- a/sys/pc98/pc98/wfd.c
+++ b/sys/pc98/pc98/wfd.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: wfd.c,v 1.5 1998/01/29 19:02:51 pst Exp $
+ * $Id: wfd.c,v 1.6 1998/02/01 21:57:49 bde Exp $
*/
/*
@@ -139,8 +139,8 @@ struct wfd {
struct diskslices *dk_slices; /* virtual drives */
};
-struct wfd *wfdtab[NUNIT]; /* Drive info by unit number */
-static int wfdnlun = 0; /* Number of configured drives */
+static struct wfd *wfdtab[NUNIT]; /* Drive info by unit number */
+static int wfdnlun = 0; /* Number of configured drives */
static void wfd_start (struct wfd *t);
static void wfd_done (struct wfd *t, struct buf *bp, int resid,
diff --git a/sys/pci/brooktree848.c b/sys/pci/brooktree848.c
index 7f9e838..fa68862 100644
--- a/sys/pci/brooktree848.c
+++ b/sys/pci/brooktree848.c
@@ -4131,7 +4131,7 @@ checkDBX:
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-int nabcst[] = {
+static int nabcst[] = {
83, (int)( 45.75 * FREQFACTOR), 0,
14, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
7, (int)(175.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -4154,7 +4154,7 @@ int nabcst[] = {
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-int irccable[] = {
+static int irccable[] = {
99, (int)( 45.75 * FREQFACTOR), 0,
95, (int)( 91.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
23, (int)(217.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -4179,7 +4179,7 @@ int irccable[] = {
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-int hrccable[] = {
+static int hrccable[] = {
99, (int)( 45.75 * FREQFACTOR), 0,
95, (int)( 90.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
23, (int)(216.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -4308,12 +4308,12 @@ int hrccable[] = {
* 100 3890 000 IFFREQ
*
*/
-int weurope[] = {
+static int weurope[] = {
100, (int)( 38.90 * FREQFACTOR), 0,
90, (int)(231.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR),
80, (int)(105.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR),
74, (int)( 69.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR),
- 21, (int)(471.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR),
+ 21, (int)(471.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR),
17, (int)(183.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR),
16, (int)(175.25 * FREQFACTOR), (int)(9.00 * FREQFACTOR),
15, (int)(82.25 * FREQFACTOR), (int)(8.50 * FREQFACTOR),
@@ -4337,7 +4337,7 @@ int weurope[] = {
*/
#define OFFSET 6.00
#define IF_FREQ 45.75
-int jpnbcst[] = {
+static int jpnbcst[] = {
62, (int)(IF_FREQ * FREQFACTOR), 0,
13, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
8, (int)(193.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -4362,7 +4362,7 @@ int jpnbcst[] = {
*/
#define OFFSET 6.00
#define IF_FREQ 45.75
-int jpncable[] = {
+static int jpncable[] = {
63, (int)(IF_FREQ * FREQFACTOR), 0,
23, (int)(223.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
22, (int)(165.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -4375,7 +4375,7 @@ int jpncable[] = {
#undef IF_FREQ
#undef OFFSET
-int* freqTable[] = {
+static int* freqTable[] = {
NULL,
nabcst,
irccable,
diff --git a/sys/pci/if_fpa.c b/sys/pci/if_fpa.c
index b0b38f0..e2e45ad 100644
--- a/sys/pci/if_fpa.c
+++ b/sys/pci/if_fpa.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_fpa.c,v 1.4 1997/08/02 14:33:10 bde Exp $
+ * $Id: if_fpa.c,v 1.5 1998/01/08 23:42:26 eivind Exp $
*
*/
@@ -213,7 +213,7 @@ pdq_pci_shutdown(
static u_long pdq_pci_count;
-struct pci_device fpadevice = {
+static struct pci_device fpadevice = {
"fpa",
pdq_pci_probe,
pdq_pci_attach,
diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c
index ef0a280..2e48cc9 100644
--- a/sys/pci/if_fxp.c
+++ b/sys/pci/if_fxp.c
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_fxp.c,v 1.46 1997/10/28 15:59:21 bde Exp $
+ * $Id: if_fxp.c,v 1.47 1998/01/08 23:42:29 eivind Exp $
*/
/*
@@ -176,7 +176,7 @@ struct fxp_supported_media {
const int fsm_defmedia; /* default media for this PHY */
};
-const int fxp_media_standard[] = {
+static const int fxp_media_standard[] = {
IFM_ETHER|IFM_10_T,
IFM_ETHER|IFM_10_T|IFM_FDX,
IFM_ETHER|IFM_100_TX,
@@ -185,12 +185,12 @@ const int fxp_media_standard[] = {
};
#define FXP_MEDIA_STANDARD_DEFMEDIA (IFM_ETHER|IFM_AUTO)
-const int fxp_media_default[] = {
+static const int fxp_media_default[] = {
IFM_ETHER|IFM_MANUAL, /* XXX IFM_AUTO ? */
};
#define FXP_MEDIA_DEFAULT_DEFMEDIA (IFM_ETHER|IFM_MANUAL)
-const struct fxp_supported_media fxp_media[] = {
+static const struct fxp_supported_media fxp_media[] = {
{ FXP_PHY_DP83840, fxp_media_standard,
sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]),
FXP_MEDIA_STANDARD_DEFMEDIA },
@@ -208,7 +208,7 @@ const struct fxp_supported_media fxp_media[] = {
static int fxp_mediachange __P((struct ifnet *));
static void fxp_mediastatus __P((struct ifnet *, struct ifmediareq *));
-void fxp_set_media __P((struct fxp_softc *, int));
+static void fxp_set_media __P((struct fxp_softc *, int));
static inline void fxp_scb_wait __P((struct fxp_softc *));
static FXP_INTR_TYPE fxp_intr __P((void *));
static void fxp_start __P((struct ifnet *));
@@ -223,7 +223,7 @@ static void fxp_mdi_write __P((struct fxp_softc *, int, int, int));
static void fxp_read_eeprom __P((struct fxp_softc *, u_int16_t *,
int, int));
static int fxp_attach_common __P((struct fxp_softc *, u_int8_t *));
-void fxp_stats_update __P((void *));
+static void fxp_stats_update __P((void *));
static void fxp_mc_setup __P((struct fxp_softc *));
/*
@@ -1044,7 +1044,7 @@ rcvloop:
* the DMA immediately, we don't wait - we just prepare to read
* them again next time.
*/
-void
+static void
fxp_stats_update(arg)
void *arg;
{
@@ -1361,7 +1361,7 @@ fxp_init(xsc)
sc->stat_ch = timeout(fxp_stats_update, sc, hz);
}
-void
+static void
fxp_set_media(sc, media)
struct fxp_softc *sc;
int media;
diff --git a/sys/pci/if_sr_p.c b/sys/pci/if_sr_p.c
index e122c81..02a32e0 100644
--- a/sys/pci/if_sr_p.c
+++ b/sys/pci/if_sr_p.c
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_sr_p.c,v 1.4 1997/02/22 09:44:07 peter Exp $
+ * $Id: if_sr_p.c,v 1.5 1997/09/02 20:06:27 bde Exp $
*/
#include "pci.h"
@@ -59,7 +59,7 @@ static void sr_pci_attach(pcici_t config_id, int unit);
static u_long src_count = NSR;
-struct pci_device sr_pci_driver =
+static struct pci_device sr_pci_driver =
{
"src",
sr_pci_probe,
diff --git a/sys/pci/if_tx.c b/sys/pci/if_tx.c
index cd32ac3..71a9e7df 100644
--- a/sys/pci/if_tx.c
+++ b/sys/pci/if_tx.c
@@ -100,7 +100,7 @@
*/
static u_long epic_pci_count;
static epic_softc_t * epics[EPIC_MAX_DEVICES];
-struct pci_device txdevice = {
+static struct pci_device txdevice = {
"tx",
epic_pci_probe,
epic_pci_attach,
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c
index 55bd801..9a95889 100644
--- a/sys/pci/ncr.c
+++ b/sys/pci/ncr.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: ncr.c,v 1.113 1997/12/02 22:37:58 se Exp $
+** $Id: ncr.c,v 1.114 1998/02/04 03:47:16 eivind Exp $
**
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
**
@@ -1342,7 +1342,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
- "\n$Id: ncr.c,v 1.113 1997/12/02 22:37:58 se Exp $\n";
+ "\n$Id: ncr.c,v 1.114 1998/02/04 03:47:16 eivind Exp $\n";
static const u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
@@ -1352,7 +1352,7 @@ static const u_long ncr_version = NCR_VERSION * 11
#ifdef KERNEL
static const int nncr=MAX_UNITS; /* XXX to be replaced by SYSCTL */
-ncb_p ncrp [MAX_UNITS]; /* XXX to be replaced by SYSCTL */
+static ncb_p ncrp [MAX_UNITS]; /* XXX to be replaced by SYSCTL */
static int ncr_debug = SCSI_NCR_DEBUG;
SYSCTL_INT(_debug, OID_AUTO, ncr_debug, CTLFLAG_RW, &ncr_debug, 0, "");
diff --git a/sys/pci/tek390.c b/sys/pci/tek390.c
index 9b4bcd2..9be42e2 100644
--- a/sys/pci/tek390.c
+++ b/sys/pci/tek390.c
@@ -126,27 +126,28 @@ static void DC390_InvalidCmd( PACB pACB );
static void DC390_reset (PACB pACB);
static PUCHAR phystovirt( PSRB pSRB, ULONG xferCnt );
-void DC390_initDCB( PACB pACB, PDCB pDCB, PSCSICMD cmd );
-void DC390_initSRB( PSRB psrb );
-void DC390_linkSRB( PACB pACB );
-void DC390_initACB( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index );
-int DC390_initAdapter( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index,
- pcici_t config_id );
+static void DC390_initDCB( PACB pACB, PDCB pDCB, PSCSICMD cmd );
+static void DC390_initSRB( PSRB psrb );
+static void DC390_linkSRB( PACB pACB );
+static void DC390_initACB( PACB pACB, ULONG io_port, UCHAR Irq,
+ USHORT index );
+static int DC390_initAdapter( PACB pACB, ULONG io_port, UCHAR Irq,
+ USHORT index, pcici_t config_id );
void DC390_EnableCfg( USHORT mechnum, UCHAR regval );
void DC390_DisableCfg( USHORT mechnum );
UCHAR DC390_inByte( USHORT mechnum, UCHAR regval );
USHORT DC390_inWord( USHORT mechnum, UCHAR regval );
ULONG DC390_inDword(USHORT mechnum, UCHAR regval );
void DC390_OutB(USHORT mechnum, UCHAR regval, UCHAR bval );
-void DC390_EnDisableCE( UCHAR mode, USHORT mechnum, PUCHAR regval );
-void DC390_EEpromOutDI( USHORT mechnum, PUCHAR regval, USHORT Carry );
-UCHAR DC390_EEpromInDO( USHORT mechnum );
-USHORT EEpromGetData1( USHORT mechnum );
-void DC390_Prepare( USHORT mechnum, PUCHAR regval, UCHAR EEpromCmd );
-void DC390_ReadEEprom( USHORT mechnum, USHORT index );
-USHORT DC390_DefaultEEprom( USHORT mechnum, USHORT index );
-USHORT DC390_CheckEEpromCheckSum( USHORT MechNum, USHORT index );
-USHORT DC390_ToMech( USHORT Mechnum, pcici_t config_id );
+static void DC390_EnDisableCE( UCHAR mode, USHORT mechnum, PUCHAR regval );
+static void DC390_EEpromOutDI( USHORT mechnum, PUCHAR regval, USHORT Carry );
+static UCHAR DC390_EEpromInDO( USHORT mechnum );
+static USHORT EEpromGetData1( USHORT mechnum );
+static void DC390_Prepare( USHORT mechnum, PUCHAR regval, UCHAR EEpromCmd );
+static void DC390_ReadEEprom( USHORT mechnum, USHORT index );
+static USHORT DC390_DefaultEEprom( USHORT mechnum, USHORT index );
+static USHORT DC390_CheckEEpromCheckSum( USHORT MechNum, USHORT index );
+static USHORT DC390_ToMech( USHORT Mechnum, pcici_t config_id );
#ifdef KERNEL
@@ -173,7 +174,7 @@ static u_int32 trmamd_info( int unit );
static u_long trmamd_count;
-struct pci_device trmamd_device = {
+static struct pci_device trmamd_device = {
"amd",
trmamd_probe,
trmamd_attach,
@@ -185,7 +186,7 @@ DATA_SET (pcidevice_set, trmamd_device);
-struct scsi_adapter trmamd_switch =
+static struct scsi_adapter trmamd_switch =
{
trmamd_scsi_cmd,
trmamd_min_phys,
@@ -200,7 +201,7 @@ struct scsi_adapter trmamd_switch =
"amd",
};
-struct scsi_device trmamd_dev =
+static struct scsi_device trmamd_dev =
{
NULL, /* Use default error handler */
NULL, /* have a queue, served by this */
@@ -242,12 +243,12 @@ static PVOID DC390_phase1[]={
DC390_Nop_1,
};
-UCHAR eepromBuf[MAX_ADAPTER_NUM][128];
+static UCHAR eepromBuf[MAX_ADAPTER_NUM][128];
-UCHAR clock_period1[] = {4, 5, 6, 7 ,8, 10, 13, 20};
+static UCHAR clock_period1[] = {4, 5, 6, 7 ,8, 10, 13, 20};
-UCHAR baddevname1[2][28] ={
+static UCHAR baddevname1[2][28] ={
"SEAGATE ST3390N ??? 9546",
"HP C3323-300 4269"};
@@ -992,7 +993,8 @@ DC390_reset (PACB pACB)
* Inputs : cmd - pointer to this scsi cmd request block structure
*
***********************************************************************/
-void DC390_initDCB( PACB pACB, PDCB pDCB, PSCSICMD cmd )
+static void
+DC390_initDCB( PACB pACB, PDCB pDCB, PSCSICMD cmd )
{
PEEprom prom;
UCHAR bval;
@@ -1065,13 +1067,15 @@ void DC390_initDCB( PACB pACB, PDCB pDCB, PSCSICMD cmd )
* Inputs : psrb - pointer to this scsi request block structure
*
***********************************************************************/
-void DC390_initSRB( PSRB psrb )
+static void
+DC390_initSRB( PSRB psrb )
{
psrb->PhysSRB = vtophys( psrb );
}
-void DC390_linkSRB( PACB pACB )
+static void
+DC390_linkSRB( PACB pACB )
{
USHORT count, i;
PSRB psrb;
@@ -1098,7 +1102,8 @@ void DC390_linkSRB( PACB pACB )
* Inputs : psh - pointer to this host adapter's structure
*
***********************************************************************/
-void DC390_initACB( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index )
+static void
+DC390_initACB( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index )
{
USHORT i;
@@ -1155,7 +1160,8 @@ void DC390_initACB( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index )
* Inputs : psh - pointer to this host adapter's structure
*
***********************************************************************/
-int DC390_initAdapter( PACB pACB, ULONG io_port, UCHAR Irq, USHORT index,
+static int DC390_initAdapter( PACB pACB, ULONG io_port, UCHAR Irq,
+ USHORT index,
pcici_t config_id )
{
USHORT ioport;
@@ -1369,7 +1375,7 @@ DC390_OutB(USHORT mechnum, UCHAR regval, UCHAR bval )
#endif /PCI_COMPAT */
-void
+static void
DC390_EnDisableCE( UCHAR mode, USHORT mechnum, PUCHAR regval )
{
@@ -1387,7 +1393,7 @@ DC390_EnDisableCE( UCHAR mode, USHORT mechnum, PUCHAR regval )
}
-void
+static void
DC390_EEpromOutDI( USHORT mechnum, PUCHAR regval, USHORT Carry )
{
UCHAR bval;
@@ -1409,7 +1415,7 @@ DC390_EEpromOutDI( USHORT mechnum, PUCHAR regval, USHORT Carry )
}
-UCHAR
+static UCHAR
DC390_EEpromInDO( USHORT mechnum )
{
UCHAR bval,regval;
@@ -1430,7 +1436,7 @@ DC390_EEpromInDO( USHORT mechnum )
}
-USHORT
+static USHORT
EEpromGetData1( USHORT mechnum )
{
UCHAR i;
@@ -1448,7 +1454,7 @@ EEpromGetData1( USHORT mechnum )
}
-void
+static void
DC390_Prepare( USHORT mechnum, PUCHAR regval, UCHAR EEpromCmd )
{
UCHAR i,j;
@@ -1465,7 +1471,7 @@ DC390_Prepare( USHORT mechnum, PUCHAR regval, UCHAR EEpromCmd )
}
-void
+static void
DC390_ReadEEprom( USHORT mechnum, USHORT index )
{
UCHAR regval,cmd;
@@ -1486,7 +1492,7 @@ DC390_ReadEEprom( USHORT mechnum, USHORT index )
}
-USHORT
+static USHORT
DC390_DefaultEEprom( USHORT mechnum, USHORT index )
{
PUCHAR ptr;
@@ -1506,7 +1512,7 @@ DC390_DefaultEEprom( USHORT mechnum, USHORT index )
}
-USHORT
+static USHORT
DC390_CheckEEpromCheckSum( USHORT MechNum, USHORT index )
{
USHORT wval, rc, *ptr;
@@ -1525,7 +1531,7 @@ DC390_CheckEEpromCheckSum( USHORT MechNum, USHORT index )
}
-USHORT
+static USHORT
DC390_ToMech( USHORT Mechnum, pcici_t config_id )
{
diff --git a/sys/scsi/worm.c b/sys/scsi/worm.c
index da29b64..9a93519 100644
--- a/sys/scsi/worm.c
+++ b/sys/scsi/worm.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: worm.c,v 1.50 1997/12/26 14:52:29 joerg Exp $
+ * $Id: worm.c,v 1.51 1998/01/24 02:54:53 eivind Exp $
*/
#include "opt_bounce.h"
@@ -110,7 +110,7 @@ struct scsi_data
int error; /* last error */
};
-struct {
+static struct {
int asc;
int devmode;
int error;
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 058f76e..9a78d71 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95
- * $Id: ffs_vfsops.c,v 1.69 1998/02/04 22:33:33 eivind Exp $
+ * $Id: ffs_vfsops.c,v 1.70 1998/02/06 12:14:15 eivind Exp $
*/
#include "opt_quota.h"
@@ -74,7 +74,7 @@ static int ffs_mount __P((struct mount *, char *, caddr_t,
struct nameidata *, struct proc *));
static int ffs_init __P((struct vfsconf *));
-struct vfsops ufs_vfsops = {
+static struct vfsops ufs_vfsops = {
ffs_mount,
ufs_start,
ffs_unmount,
diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c
index 7bb5cb9..e37ead5 100644
--- a/sys/ufs/mfs/mfs_vfsops.c
+++ b/sys/ufs/mfs/mfs_vfsops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95
- * $Id: mfs_vfsops.c,v 1.38 1997/11/12 05:42:30 julian Exp $
+ * $Id: mfs_vfsops.c,v 1.39 1998/01/24 02:54:56 eivind Exp $
*/
#include "opt_mfs.h"
@@ -86,7 +86,7 @@ static int mfs_init __P((struct vfsconf *));
/*
* mfs vfs operations.
*/
-struct vfsops mfs_vfsops = {
+static struct vfsops mfs_vfsops = {
mfs_mount,
mfs_start,
ffs_unmount,
diff --git a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c
index 56be3fd..a51ff4e 100644
--- a/sys/ufs/ufs/ufs_ihash.c
+++ b/sys/ufs/ufs/ufs_ihash.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95
- * $Id: ufs_ihash.c,v 1.14 1998/02/04 22:33:35 eivind Exp $
+ * $Id: ufs_ihash.c,v 1.15 1998/02/06 12:14:17 eivind Exp $
*/
#include <sys/param.h>
@@ -49,10 +49,10 @@ static MALLOC_DEFINE(M_UFSIHASH, "UFS ihash", "UFS Inode hash tables");
/*
* Structures associated with inode cacheing.
*/
-LIST_HEAD(ihashhead, inode) *ihashtbl;
-u_long ihash; /* size of hash table - 1 */
+static LIST_HEAD(ihashhead, inode) *ihashtbl;
+static u_long ihash; /* size of hash table - 1 */
#define INOHASH(device, inum) (&ihashtbl[((device) + (inum)) & ihash])
-struct simplelock ufs_ihash_slock;
+static struct simplelock ufs_ihash_slock;
/*
* Initialize inode hash table.
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index 20b4f23..da4641d 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_quota.c 8.5 (Berkeley) 5/20/95
- * $Id: ufs_quota.c,v 1.17 1998/02/04 22:33:36 eivind Exp $
+ * $Id: ufs_quota.c,v 1.18 1998/02/06 12:14:18 eivind Exp $
*/
#include <sys/param.h>
@@ -692,7 +692,7 @@ static u_long dqhash;
* Dquot free list.
*/
#define DQUOTINC 5 /* minimum free dquots desired */
-TAILQ_HEAD(dqfreelist, dquot) dqfreelist;
+static TAILQ_HEAD(dqfreelist, dquot) dqfreelist;
static long numdquot, desireddquot = DQUOTINC;
/*
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index f771b58..28eae14 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
- * $Id: ufs_vnops.c,v 1.76 1998/02/04 22:33:37 eivind Exp $
+ * $Id: ufs_vnops.c,v 1.77 1998/02/06 12:14:19 eivind Exp $
*/
#include "opt_quota.h"
@@ -2126,7 +2126,7 @@ ufs_missingop(ap)
}
/* Global vfs data structures for ufs. */
-vop_t **ufs_vnodeop_p;
+static vop_t **ufs_vnodeop_p;
static struct vnodeopv_entry_desc ufs_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *) vop_defaultop },
{ &vop_fsync_desc, (vop_t *) ufs_missingop },
@@ -2169,7 +2169,7 @@ static struct vnodeopv_entry_desc ufs_vnodeop_entries[] = {
static struct vnodeopv_desc ufs_vnodeop_opv_desc =
{ &ufs_vnodeop_p, ufs_vnodeop_entries };
-vop_t **ufs_specop_p;
+static vop_t **ufs_specop_p;
static struct vnodeopv_entry_desc ufs_specop_entries[] = {
{ &vop_default_desc, (vop_t *) spec_vnoperate },
{ &vop_fsync_desc, (vop_t *) ufs_missingop },
@@ -2190,7 +2190,7 @@ static struct vnodeopv_entry_desc ufs_specop_entries[] = {
static struct vnodeopv_desc ufs_specop_opv_desc =
{ &ufs_specop_p, ufs_specop_entries };
-vop_t **ufs_fifoop_p;
+static vop_t **ufs_fifoop_p;
static struct vnodeopv_entry_desc ufs_fifoop_entries[] = {
{ &vop_default_desc, (vop_t *) fifo_vnoperate },
{ &vop_fsync_desc, (vop_t *) ufs_missingop },
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index b464b00..c4e78b9 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -39,7 +39,7 @@
* from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
*
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
- * $Id: swap_pager.c,v 1.86 1998/02/04 22:33:41 eivind Exp $
+ * $Id: swap_pager.c,v 1.87 1998/02/06 12:14:21 eivind Exp $
*/
/*
@@ -110,7 +110,7 @@ static struct swpclean swap_pager_inuse;
/* list of free pager clean structs */
static struct swpclean swap_pager_free;
-int swap_pager_free_count;
+static int swap_pager_free_count;
/* list of "named" anon region objects */
static struct pagerlst swap_pager_object_list;
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index ea3080c..bb352bc 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -66,7 +66,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_fault.c,v 1.78 1998/02/04 22:33:43 eivind Exp $
+ * $Id: vm_fault.c,v 1.79 1998/02/06 12:14:22 eivind Exp $
*/
/*
@@ -94,7 +94,8 @@
#include <vm/vnode_pager.h>
#include <vm/vm_extern.h>
-int vm_fault_additional_pages __P((vm_page_t, int, int, vm_page_t *, int *));
+static int vm_fault_additional_pages __P((vm_page_t, int,
+ int, vm_page_t *, int *));
#define VM_FAULT_READ_AHEAD 8
#define VM_FAULT_READ_BEHIND 7
@@ -1003,7 +1004,7 @@ vm_fault_copy_entry(dst_map, src_map, dst_entry, src_entry)
* Return value:
* number of pages in marray
*/
-int
+static int
vm_fault_additional_pages(m, rbehind, rahead, marray, reqpage)
vm_page_t m;
int rbehind;
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index e98b9c3..8bb9490 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -59,7 +59,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_glue.c,v 1.72 1998/02/05 03:32:38 dyson Exp $
+ * $Id: vm_glue.c,v 1.73 1998/02/06 12:14:22 eivind Exp $
*/
#include "opt_rlimit.h"
@@ -377,7 +377,7 @@ loop:
/*
* Swap_idle_threshold1 is the guaranteed swapped in time for a process
*/
-int swap_idle_threshold1 = 2;
+static int swap_idle_threshold1 = 2;
SYSCTL_INT(_vm, OID_AUTO, swap_idle_threshold1,
CTLFLAG_RW, &swap_idle_threshold1, 0, "");
@@ -385,7 +385,7 @@ SYSCTL_INT(_vm, OID_AUTO, swap_idle_threshold1,
* Swap_idle_threshold2 is the time that a process can be idle before
* it will be swapped out, if idle swapping is enabled.
*/
-int swap_idle_threshold2 = 10;
+static int swap_idle_threshold2 = 10;
SYSCTL_INT(_vm, OID_AUTO, swap_idle_threshold2,
CTLFLAG_RW, &swap_idle_threshold2, 0, "");
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index f0941df..99231f8 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_map.c,v 1.112 1998/02/06 12:14:24 eivind Exp $
+ * $Id: vm_map.c,v 1.113 1998/02/08 14:55:13 dyson Exp $
*/
/*
@@ -161,9 +161,9 @@ static struct vm_zone kmapentzone_store, mapentzone_store, mapzone_store;
static vm_zone_t mapentzone, kmapentzone, mapzone, vmspace_zone;
static struct vm_object kmapentobj, mapentobj, mapobj;
#define MAP_ENTRY_INIT 128
-struct vm_map_entry map_entry_init[MAX_MAPENT];
-struct vm_map_entry kmap_entry_init[MAX_KMAPENT];
-struct vm_map map_init[MAX_KMAP];
+static struct vm_map_entry map_entry_init[MAX_MAPENT];
+static struct vm_map_entry kmap_entry_init[MAX_KMAPENT];
+static struct vm_map map_init[MAX_KMAP];
static void _vm_map_clip_end __P((vm_map_t, vm_map_entry_t, vm_offset_t));
static void _vm_map_clip_start __P((vm_map_t, vm_map_entry_t, vm_offset_t));
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 2eb01ef..22b3f7a 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_object.c,v 1.111 1998/02/05 03:32:44 dyson Exp $
+ * $Id: vm_object.c,v 1.112 1998/02/06 12:14:26 eivind Exp $
*/
/*
@@ -120,7 +120,7 @@ static void vm_object_dispose __P((vm_object_t));
*/
struct object_q vm_object_list;
-struct simplelock vm_object_list_lock;
+static struct simplelock vm_object_list_lock;
static long vm_object_count; /* count of all objects */
vm_object_t kernel_object;
vm_object_t kmem_object;
@@ -134,7 +134,7 @@ static int next_index;
static vm_zone_t obj_zone;
static struct vm_zone obj_zone_store;
#define VM_OBJECTS_INIT 256
-struct vm_object vm_objects_init[VM_OBJECTS_INIT];
+static struct vm_object vm_objects_init[VM_OBJECTS_INIT];
void
_vm_object_allocate(type, size, object)
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 439c517..c9edfd8 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
- * $Id: vm_page.c,v 1.91 1998/02/05 03:32:46 dyson Exp $
+ * $Id: vm_page.c,v 1.92 1998/02/06 12:14:27 eivind Exp $
*/
/*
@@ -105,10 +105,10 @@ struct pglist vm_page_queue_active = {0};
struct pglist vm_page_queue_inactive = {0};
struct pglist vm_page_queue_cache[PQ_L2_SIZE] = {0};
-int no_queue=0;
+static int no_queue=0;
struct vpgqueues vm_page_queues[PQ_COUNT] = {0};
-int pqcnt[PQ_COUNT] = {0};
+static int pqcnt[PQ_COUNT] = {0};
static void
vm_page_queue_init(void) {
@@ -144,7 +144,7 @@ vm_page_queue_init(void) {
}
vm_page_t vm_page_array = 0;
-int vm_page_array_size = 0;
+static int vm_page_array_size = 0;
long first_page = 0;
static long last_page;
static vm_size_t page_mask;
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index ba87c3c..97ee2e3 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -65,7 +65,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_pageout.c,v 1.112 1998/02/05 03:32:48 dyson Exp $
+ * $Id: vm_pageout.c,v 1.113 1998/02/06 12:14:28 eivind Exp $
*/
/*
@@ -138,19 +138,19 @@ static int vm_daemon_needed;
extern int nswiodone;
extern int vm_swap_size;
extern int vfs_update_wakeup;
-int vm_pageout_stats_max=0, vm_pageout_stats_interval = 0;
-int vm_pageout_full_stats_interval = 0;
-int vm_pageout_stats_free_max=0, vm_pageout_algorithm_lru=0;
-int defer_swap_pageouts=0;
-int disable_swap_pageouts=0;
+static int vm_pageout_stats_max=0, vm_pageout_stats_interval = 0;
+static int vm_pageout_full_stats_interval = 0;
+static int vm_pageout_stats_free_max=0, vm_pageout_algorithm_lru=0;
+static int defer_swap_pageouts=0;
+static int disable_swap_pageouts=0;
-int max_page_launder=100;
+static int max_page_launder=100;
#if defined(NO_SWAPPING)
-int vm_swap_enabled=0;
-int vm_swap_idle_enabled=0;
+static int vm_swap_enabled=0;
+static int vm_swap_idle_enabled=0;
#else
-int vm_swap_enabled=1;
-int vm_swap_idle_enabled=0;
+static int vm_swap_enabled=1;
+static int vm_swap_idle_enabled=0;
#endif
SYSCTL_INT(_vm, VM_PAGEOUT_ALGORITHM, pageout_algorithm,
diff --git a/sys/vm/vm_zone.c b/sys/vm/vm_zone.c
index 6c1d5ec..7f4c5d0 100644
--- a/sys/vm/vm_zone.c
+++ b/sys/vm/vm_zone.c
@@ -11,7 +11,7 @@
* 2. Absolutely no warranty of function or purpose is made by the author
* John S. Dyson.
*
- * $Id: vm_zone.c,v 1.16 1998/02/04 22:33:58 eivind Exp $
+ * $Id: vm_zone.c,v 1.17 1998/02/06 12:14:29 eivind Exp $
*/
#include <sys/param.h>
@@ -49,8 +49,8 @@ static MALLOC_DEFINE(M_ZONE, "ZONE", "Zone header");
* zalloci, zfreei, are the interrupt/lock safe allocation/free routines.
*/
-struct vm_zone *zlist;
-int sysctl_vm_zone SYSCTL_HANDLER_ARGS;
+static struct vm_zone *zlist;
+static int sysctl_vm_zone SYSCTL_HANDLER_ARGS;
/*
* Create a zone, but don't allocate the zone structure. If the
@@ -363,7 +363,7 @@ _zget(vm_zone_t z)
return item;
}
-int
+static int
sysctl_vm_zone SYSCTL_HANDLER_ARGS
{
int error=0;
OpenPOWER on IntegriCloud