Another mega commit to staticize things.

This commit is contained in:
Poul-Henning Kamp 1995-12-14 09:55:16 +00:00
parent 87b6de2b76
commit f708ef1b9e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12820
82 changed files with 692 additions and 730 deletions

View File

@ -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_de.c,v 1.38 1995/11/29 11:19:02 asami Exp $
* $Id: if_de.c,v 1.39 1995/12/07 12:47:34 davidg Exp $
*
*/
@ -350,7 +350,7 @@ static const char *tulip_chipdescs[] = {
#if defined(__FreeBSD__)
typedef void ifnet_ret_t;
typedef int ioctl_cmd_t;
tulip_softc_t *tulips[NDE];
static tulip_softc_t *tulips[NDE];
#define TULIP_UNIT_TO_SOFTC(unit) (tulips[unit])
#endif
#if defined(__bsdi__)

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: pci.c,v 1.35 1995/12/06 15:52:23 se Exp $
** $Id: pci.c,v 1.36 1995/12/07 12:47:42 davidg Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@ -139,7 +139,7 @@ pci_bridge_config (void);
unsigned pci_max_burst_len = 3; /* 2=16Byte, 3=32Byte, 4=64Byte, ... */
unsigned pci_mechanism = 0;
unsigned pci_maxdevice = 0;
struct pcibus* pcibus;
static struct pcibus* pcibus;
/*--------------------------------------------------------
**
@ -1132,7 +1132,7 @@ pci_internalize (struct kern_devconf *kdcp, struct sysctl_req *re)
**-----------------------------------------------------------------------
*/
struct pci_int_desc*
static struct pci_int_desc*
pci_int_desc [PCI_MAX_IRQ];
#ifndef NO_SHARED_IRQ

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)fifo.h 8.2 (Berkeley) 2/2/94
* $Id: fifo.h,v 1.8 1995/12/11 09:24:09 phk Exp $
* $Id: fifo.h,v 1.9 1995/12/11 10:26:32 phk Exp $
*/
extern vop_t **fifo_vnodeop_p;
@ -40,7 +40,6 @@ extern vop_t **fifo_vnodeop_p;
* Prototypes for fifo operations on vnodes.
*/
int fifo_badop __P((void));
int fifo_ebadf __P((void));
int fifo_printinfo __P((struct vnode *));
int fifo_lookup __P((struct vop_lookup_args *));
#define fifo_create ((int (*) __P((struct vop_create_args *)))fifo_badop)
@ -68,11 +67,8 @@ int fifo_select __P((struct vop_select_args *));
#define fifo_abortop ((int (*) __P((struct vop_abortop_args *)))fifo_badop)
#define fifo_inactive ((int (*) __P((struct vop_inactive_args *)))nullop)
#define fifo_reclaim ((int (*) __P((struct vop_reclaim_args *)))nullop)
int fifo_lock __P((struct vop_lock_args *));
int fifo_unlock __P((struct vop_unlock_args *));
int fifo_bmap __P((struct vop_bmap_args *));
#define fifo_strategy ((int (*) __P((struct vop_strategy_args *)))fifo_badop)
int fifo_print __P((struct vop_print_args *));
#define fifo_islocked ((int (*) __P((struct vop_islocked_args *)))nullop)
int fifo_pathconf __P((struct vop_pathconf_args *));
int fifo_advlock __P((struct vop_advlock_args *));

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)fifo_vnops.c 8.2 (Berkeley) 1/4/94
* $Id: fifo_vnops.c,v 1.13 1995/12/11 09:24:13 phk Exp $
* $Id: fifo_vnops.c,v 1.14 1995/12/11 10:26:34 phk Exp $
*/
#include <sys/param.h>
@ -62,8 +62,13 @@ struct fifoinfo {
long fi_writers;
};
static int fifo_ebadf __P((void));
static int fifo_unlock __P((struct vop_unlock_args *));
static int fifo_lock __P((struct vop_lock_args *));
static int fifo_print __P((struct vop_print_args *));
vop_t **fifo_vnodeop_p;
struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *)vn_default_error },
{ &vop_lookup_desc, (vop_t *)fifo_lookup }, /* lookup */
{ &vop_create_desc, (vop_t *)fifo_create }, /* create */
@ -107,7 +112,7 @@ struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)fifo_bwrite }, /* bwrite */
{ NULL, NULL }
};
struct vnodeopv_desc fifo_vnodeop_opv_desc =
static struct vnodeopv_desc fifo_vnodeop_opv_desc =
{ &fifo_vnodeop_p, fifo_vnodeop_entries };
VNODEOP_SET(fifo_vnodeop_opv_desc);
@ -382,7 +387,7 @@ fifo_bmap(ap)
* At the moment we do not do any locking.
*/
/* ARGSUSED */
int
static int
fifo_lock(ap)
struct vop_lock_args /* {
struct vnode *a_vp;
@ -393,7 +398,7 @@ fifo_lock(ap)
}
/* ARGSUSED */
int
static int
fifo_unlock(ap)
struct vop_unlock_args /* {
struct vnode *a_vp;
@ -459,7 +464,7 @@ fifo_printinfo(vp)
/*
* Print out the contents of a fifo vnode.
*/
int
static int
fifo_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
@ -503,7 +508,7 @@ fifo_pathconf(ap)
/*
* Fifo failed operation
*/
int
static int
fifo_ebadf()
{

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94
* $Id: spec_vnops.c,v 1.24 1995/12/11 09:24:50 phk Exp $
* $Id: spec_vnops.c,v 1.25 1995/12/13 15:13:31 julian Exp $
*/
#include <sys/param.h>
@ -60,6 +60,9 @@
#include <miscfs/specfs/specdev.h>
static int spec_ebadf __P((void));
static int spec_getattr __P((struct vop_getattr_args *));
struct vnode *speclisth[SPECHSZ];
vop_t **spec_vnodeop_p;
static struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
@ -842,7 +845,7 @@ spec_getpages(ap)
}
/* ARGSUSED */
int
static int
spec_getattr(ap)
struct vop_getattr_args /* {
struct vnode *a_vp;

View File

@ -56,7 +56,7 @@
* W. Metzenthen June 1994.
*
*
* $Id: fpu_aux.c,v 1.2 1994/04/29 21:16:19 gclarkii Exp $
* $Id: fpu_aux.c,v 1.3 1994/06/10 07:44:17 rich Exp $
*
*/
@ -72,8 +72,7 @@
#include "status_w.h"
void
static void
fclex(void)
{
status_word &= ~(SW_Backward | SW_Summary | SW_Stack_Fault | SW_Precision |
@ -135,7 +134,7 @@ fnop(void)
{
}
FUNC fp_nop_table[] = {
static FUNC fp_nop_table[] = {
fnop, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl, Un_impl
};

View File

@ -1,6 +1,6 @@
/*
*
* $Id: fpu_proto.h,v 1.2 1994/04/29 21:16:23 gclarkii Exp $
* $Id: fpu_proto.h,v 1.3 1995/03/16 18:11:11 bde Exp $
*
*/
@ -41,7 +41,6 @@ extern void fsubp_(void);
extern void fdivrp(void);
extern void fdivp_(void);
/* fpu_aux.c */
extern void fclex(void);
extern void finit(void);
extern void finit_(void);
extern void fstsw_(void);
@ -70,7 +69,6 @@ extern void load_store_instr(char type);
extern int poly_2xm1(FPU_REG * arg, FPU_REG * result);
/* poly_atan.c */
extern void poly_atan(FPU_REG * arg);
extern void poly_add_1(FPU_REG * src);
/* poly_l2.c */
extern void poly_l2(FPU_REG * arg, FPU_REG * result);
extern int poly_l2p1(FPU_REG * arg, FPU_REG * result);

View File

@ -56,7 +56,7 @@
* W. Metzenthen June 1994.
*
*
* $Id: poly_atan.c,v 1.3 1994/04/29 21:23:26 gclarkii Exp $
* $Id: poly_atan.c,v 1.4 1994/06/10 07:44:34 rich Exp $
*
*/
@ -92,6 +92,7 @@ static unsigned denomterm[2] =
{0xfc4bd208, 0xea2e6612};
static void poly_add_1(FPU_REG * src);
/*--- poly_atan() -----------------------------------------------------------+
| |
@ -227,7 +228,7 @@ poly_atan(FPU_REG * arg)
i.e. have an exponent (not checked) of EXP_BIAS-1 but need not
be normalized.
This function adds 1.0 to the (assumed positive) argument. */
void
static void
poly_add_1(FPU_REG * src)
{
/* Rounding in a consistent direction produces better results

View File

@ -76,13 +76,9 @@
FPU_REG CONST_1 = {SIGN_POS, TW_Valid, EXP_BIAS,
0x00000000, 0x80000000};
FPU_REG CONST_2 = {SIGN_POS, TW_Valid, EXP_BIAS + 1,
0x00000000, 0x80000000};
FPU_REG CONST_HALF = {SIGN_POS, TW_Valid, EXP_BIAS - 1,
0x00000000, 0x80000000};
FPU_REG CONST_L2T = {SIGN_POS, TW_Valid, EXP_BIAS + 1,
static FPU_REG CONST_L2T = {SIGN_POS, TW_Valid, EXP_BIAS + 1,
0xcd1b8afe, 0xd49a784b};
FPU_REG CONST_L2E = {SIGN_POS, TW_Valid, EXP_BIAS,
static FPU_REG CONST_L2E = {SIGN_POS, TW_Valid, EXP_BIAS,
0x5c17f0bc, 0xb8aa3b29};
FPU_REG CONST_PI = {SIGN_POS, TW_Valid, EXP_BIAS + 1,
0x2168c235, 0xc90fdaa2};
@ -90,7 +86,7 @@ FPU_REG CONST_PI2 = {SIGN_POS, TW_Valid, EXP_BIAS,
0x2168c235, 0xc90fdaa2};
FPU_REG CONST_PI4 = {SIGN_POS, TW_Valid, EXP_BIAS - 1,
0x2168c235, 0xc90fdaa2};
FPU_REG CONST_LG2 = {SIGN_POS, TW_Valid, EXP_BIAS - 2,
static FPU_REG CONST_LG2 = {SIGN_POS, TW_Valid, EXP_BIAS - 2,
0xfbcff799, 0x9a209a84};
FPU_REG CONST_LN2 = {SIGN_POS, TW_Valid, EXP_BIAS - 1,
0xd1cf79ac, 0xb17217f7};

View File

@ -42,7 +42,7 @@
* SUCH DAMAGE.
*
* from: @(#)conf.c 5.8 (Berkeley) 5/12/91
* $Id: conf.c,v 1.113 1995/12/08 11:13:18 julian Exp $
* $Id: conf.c,v 1.114 1995/12/13 15:12:18 julian Exp $
*/
#include <sys/param.h>
@ -83,12 +83,6 @@ int nchrdev = NUMCDEV;
*/
dev_t swapdev = makedev(1, 0);
/*
* The tunnel device's LKM wants to know where to install itself in the
* cdevsw table. Sigh.
*/
dev_t tuncdev = makedev(52, 0);
/*
* Routine that identifies /dev/mem and /dev/kmem.
*

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94
* $Id: uipc_usrreq.c,v 1.11 1995/08/16 16:13:27 bde Exp $
* $Id: uipc_usrreq.c,v 1.12 1995/08/31 01:39:31 dyson Exp $
*/
#include <sys/param.h>
@ -59,8 +59,22 @@
* rethink name space problems
* need a proper out-of-band
*/
struct sockaddr sun_noname = { sizeof(sun_noname), AF_LOCAL };
ino_t unp_ino; /* prototype for fake inode numbers */
static struct sockaddr sun_noname = { sizeof(sun_noname), AF_LOCAL };
static ino_t unp_ino; /* prototype for fake inode numbers */
static int unp_attach __P((struct socket *));
static void unp_detach __P((struct unpcb *));
static int unp_bind __P((struct unpcb *,struct mbuf *, struct proc *));
static int unp_connect __P((struct socket *,struct mbuf *, struct proc *));
static void unp_disconnect __P((struct unpcb *));
static void unp_shutdown __P((struct unpcb *));
static void unp_drop __P((struct unpcb *, int));
static void unp_gc __P((void));
static void unp_scan __P((struct mbuf *, void (*)(struct file *)));
static void unp_mark __P((struct file *));
static void unp_discard __P((struct file *));
static int unp_internalize __P((struct mbuf *, struct proc *));
/*ARGSUSED*/
int
@ -336,14 +350,14 @@ release:
#ifndef PIPSIZ
#define PIPSIZ 8192
#endif
u_long unpst_sendspace = PIPSIZ;
u_long unpst_recvspace = PIPSIZ;
u_long unpdg_sendspace = 2*1024; /* really max datagram size */
u_long unpdg_recvspace = 4*1024;
static u_long unpst_sendspace = PIPSIZ;
static u_long unpst_recvspace = PIPSIZ;
static u_long unpdg_sendspace = 2*1024; /* really max datagram size */
static u_long unpdg_recvspace = 4*1024;
int unp_rights; /* file descriptors in flight */
static int unp_rights; /* file descriptors in flight */
int
static int
unp_attach(so)
struct socket *so;
{
@ -377,7 +391,7 @@ unp_attach(so)
return (0);
}
void
static void
unp_detach(unp)
register struct unpcb *unp;
{
@ -408,7 +422,7 @@ unp_detach(unp)
(void) m_free(dtom(unp));
}
int
static int
unp_bind(unp, nam, p)
struct unpcb *unp;
struct mbuf *nam;
@ -458,7 +472,7 @@ unp_bind(unp, nam, p)
return (0);
}
int
static int
unp_connect(so, nam, p)
struct socket *so;
struct mbuf *nam;
@ -548,7 +562,7 @@ unp_connect2(so, so2)
return (0);
}
void
static void
unp_disconnect(unp)
struct unpcb *unp;
{
@ -595,7 +609,7 @@ unp_abort(unp)
}
#endif
void
static void
unp_shutdown(unp)
struct unpcb *unp;
{
@ -606,7 +620,7 @@ unp_shutdown(unp)
socantrcvmore(so);
}
void
static void
unp_drop(unp, errno)
struct unpcb *unp;
int errno;
@ -663,7 +677,7 @@ unp_externalize(rights)
return (0);
}
int
static int
unp_internalize(control, p)
struct mbuf *control;
struct proc *p;
@ -697,9 +711,9 @@ unp_internalize(control, p)
return (0);
}
int unp_defer, unp_gcing;
static int unp_defer, unp_gcing;
void
static void
unp_gc()
{
register struct file *fp, *nextfp;
@ -818,7 +832,7 @@ unp_dispose(m)
unp_scan(m, unp_discard);
}
void
static void
unp_scan(m0, op)
register struct mbuf *m0;
void (*op)(struct file *);
@ -848,7 +862,7 @@ unp_scan(m0, op)
}
}
void
static void
unp_mark(fp)
struct file *fp;
{
@ -859,7 +873,7 @@ unp_mark(fp)
fp->f_flag |= (FMARK|FDEFER);
}
void
static void
unp_discard(fp)
struct file *fp;
{

View File

@ -33,11 +33,13 @@
* SUCH DAMAGE.
*
* @(#)vfs_cache.c 8.3 (Berkeley) 8/22/94
* $Id: vfs_cache.c,v 1.16 1995/07/29 11:40:19 bde Exp $
* $Id: vfs_cache.c,v 1.17 1995/10/29 15:31:18 phk Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/time.h>
#include <sys/mount.h>
#include <sys/vnode.h>
@ -70,14 +72,15 @@
/*
* Structures associated with name cacheing.
*/
LIST_HEAD(nchashhead, namecache) *nchashtbl; /* Hash Table */
TAILQ_HEAD(, namecache) nclruhead; /* LRU chain */
u_long nchash; /* size of hash table */
static LIST_HEAD(nchashhead, namecache) *nchashtbl; /* Hash Table */
static TAILQ_HEAD(, namecache) nclruhead; /* LRU chain */
static u_long nchash; /* size of hash table */
struct nchstats nchstats; /* cache effectiveness statistics */
struct vnode nchENOENT; /* our own "novnode" */
int doingcache = 1; /* 1 => enable the cache */
static struct vnode nchENOENT; /* our own "novnode" */
static int doingcache = 1; /* 1 => enable the cache */
SYSCTL_INT(_debug, OID_AUTO, vfscache, CTLFLAG_RW, &doingcache, 0, "");
u_long nextvnodeid;
u_long numcache;
static u_long numcache;
u_long numvnodes;
#ifdef NCH_STATISTICS

View File

@ -32,7 +32,7 @@
# SUCH DAMAGE.
#
# @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93
# $Id: vnode_if.sh,v 1.7 1995/10/29 15:31:27 phk Exp $
# $Id: vnode_if.sh,v 1.8 1995/12/06 23:33:39 bde Exp $
#
# Script to produce VFS front-end sugar.
@ -400,7 +400,7 @@ static inline int VOP_BWRITE(bp)
END_OF_SPECIAL_CASES
cat << END_OF_SPECIAL_CASES >> $CFILE
int vop_strategy_vp_offsets[] = {
static int vop_strategy_vp_offsets[] = {
VDESC_NO_OFFSET
};
struct vnodeop_desc vop_strategy_desc = {
@ -414,7 +414,7 @@ struct vnodeop_desc vop_strategy_desc = {
VDESC_NO_OFFSET,
NULL,
};
int vop_bwrite_vp_offsets[] = {
static int vop_bwrite_vp_offsets[] = {
VDESC_NO_OFFSET
};
struct vnodeop_desc vop_bwrite_desc = {

View File

@ -32,7 +32,7 @@
# SUCH DAMAGE.
#
# @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93
# $Id: vnode_if.sh,v 1.7 1995/10/29 15:31:27 phk Exp $
# $Id: vnode_if.sh,v 1.8 1995/12/06 23:33:39 bde Exp $
#
# Script to produce VFS front-end sugar.
@ -400,7 +400,7 @@ static inline int VOP_BWRITE(bp)
END_OF_SPECIAL_CASES
cat << END_OF_SPECIAL_CASES >> $CFILE
int vop_strategy_vp_offsets[] = {
static int vop_strategy_vp_offsets[] = {
VDESC_NO_OFFSET
};
struct vnodeop_desc vop_strategy_desc = {
@ -414,7 +414,7 @@ struct vnodeop_desc vop_strategy_desc = {
VDESC_NO_OFFSET,
NULL,
};
int vop_bwrite_vp_offsets[] = {
static int vop_bwrite_vp_offsets[] = {
VDESC_NO_OFFSET
};
struct vnodeop_desc vop_bwrite_desc = {

View File

@ -15,56 +15,6 @@ void dev_free_name(devnm_p devnmp) /*proto*/;
int devfs_vntodn(struct vnode *vn_p, dn_p *dn_pp) /*proto*/;
int devfs_dntovn(dn_p dnp, struct vnode **vn_pp) /*proto*/;
int dev_add_entry(char *name, dn_p parent, int type, union typeinfo *by, devnm_p *nm_pp) /*proto*/ ;
int devfs_init(void) /*proto*/;
int devfs_mount( struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, struct proc *p) /*proto*/;
int mountdevfs( struct mount *mp, struct proc *p) /*proto*/;
int devfs_start(struct mount *mp, int flags, struct proc *p) /*proto*/;
int devfs_unmount( struct mount *mp, int mntflags, struct proc *p) /*proto*/;
int devfs_root(struct mount *mp, struct vnode **vpp) /*proto*/;
int devfs_quotactl( struct mount *mp, int cmds, uid_t uid, caddr_t arg, struct proc *p) /*proto*/;
int devfs_statfs( struct mount *mp, struct statfs *sbp, struct proc *p) /*proto*/;
int devfs_sync(struct mount *mp, int waitfor,struct ucred *cred,struct proc *p) /*proto*/;
int devfs_vget(struct mount *mp, ino_t ino,struct vnode **vpp) /*proto*/;
int devfs_fhtovp (struct mount *mp, struct fid *fhp, struct mbuf *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp) /*proto*/;
int devfs_vptofh (struct vnode *vp, struct fid *fhp) /*proto*/;
int devfs_lookup(struct vop_lookup_args *ap) /*proto*/;
int devfs_create(struct vop_mknod_args *ap) /*proto*/;
int devfs_mknod( struct vop_mknod_args *ap) /*proto*/;
int devfs_open(struct vop_open_args *ap) /*proto*/;
int devfs_close( struct vop_close_args *ap) /*proto*/;
int devfs_access(struct vop_access_args *ap) /*proto*/;
int devfs_getattr(struct vop_getattr_args *ap) /*proto*/;
int devfs_setattr(struct vop_setattr_args *ap) /*proto*/;
int devfs_read(struct vop_read_args *ap) /*proto*/;
int devfs_write(struct vop_write_args *ap) /*proto*/;
int devfs_ioctl(struct vop_ioctl_args *ap) /*proto*/;
int devfs_select(struct vop_select_args *ap) /*proto*/;
int devfs_mmap(struct vop_mmap_args *ap) /*proto*/;
int devfs_fsync(struct vop_fsync_args *ap) /*proto*/;
int devfs_seek(struct vop_seek_args *ap) /*proto*/;
int devfs_remove(struct vop_remove_args *ap) /*proto*/;
int devfs_link(struct vop_link_args *ap) /*proto*/;
int devfs_rename(struct vop_rename_args *ap) /*proto*/;
int devfs_mkdir(struct vop_mkdir_args *ap) /*proto*/;
int devfs_rmdir(struct vop_rmdir_args *ap) /*proto*/;
int devfs_symlink(struct vop_symlink_args *ap) /*proto*/;
int devfs_readdir(struct vop_readdir_args *ap) /*proto*/;
int devfs_readlink(struct vop_readlink_args *ap) /*proto*/;
int devfs_abortop(struct vop_abortop_args *ap) /*proto*/;
int devfs_inactive(struct vop_inactive_args *ap) /*proto*/;
int devfs_lock(struct vop_lock_args *ap) /*proto*/;
int devfs_unlock( struct vop_unlock_args *ap) /*proto*/;
int devfs_islocked(struct vop_islocked_args *ap) /*proto*/;
int devfs_bmap(struct vop_bmap_args *ap) /*proto*/;
int devfs_strategy(struct vop_strategy_args *ap) /*proto*/;
int devfs_advlock(struct vop_advlock_args *ap) /*proto*/;
int devfs_reclaim(struct vop_reclaim_args *ap) /*proto*/;
int devfs_pathconf(struct vop_pathconf_args *ap) /*proto*/;
int devfs_print(struct vop_print_args *ap) /*proto*/;
int devfs_vfree(struct vop_vfree_args *ap) /*proto*/;
int devfs_enotsupp(void *junk) /*proto*/;
int devfs_badop(void *junk) /*proto*/;
int devfs_nullop(void *junk) /*proto*/;
void devfs_dropvnode(dn_p dnp) /*proto*/;
/* THIS FILE PRODUCED AUTOMATICALLY */
/* DO NOT EDIT (see reproto.sh) */

View File

@ -1,7 +1,7 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.5 1995/09/06 09:29:17 julian Exp $
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vfsops.c,v 1.6 1995/09/07 06:01:35 julian Exp $
*
*
*/
@ -19,8 +19,10 @@
#include "malloc.h"
#include "devfsdefs.h"
static int devfs_statfs( struct mount *mp, struct statfs *sbp, struct proc *p);
int devfs_init(void) /*proto*/
static int
devfs_init(void)
{
printf("devfs ready to run\n");
return 0; /*XXX*/
@ -84,7 +86,8 @@ DBPRINT(("mount "));
return 0;
}
int mountdevfs( struct mount *mp, struct proc *p) /*proto*/
static int
mountdevfs( struct mount *mp, struct proc *p)
{
int error = 0;
int ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
@ -113,7 +116,8 @@ int mountdevfs( struct mount *mp, struct proc *p) /*proto*/
return error;
}
int devfs_start(struct mount *mp, int flags, struct proc *p) /*proto*/
static int
devfs_start(struct mount *mp, int flags, struct proc *p)
{
DBPRINT(("start "));
return 0;
@ -124,7 +128,8 @@ DBPRINT(("start "));
* Note: vnodes from this FS may hang around if being used..
* This should not be a problem, they should be self contained.
*/
int devfs_unmount( struct mount *mp, int mntflags, struct proc *p) /*proto*/
static int
devfs_unmount( struct mount *mp, int mntflags, struct proc *p)
{
int flags = 0;
int error = 0;
@ -139,7 +144,8 @@ DBPRINT(("unmount "));
}
/* return the address of the root vnode in *vpp */
int devfs_root(struct mount *mp, struct vnode **vpp) /*proto*/
static int
devfs_root(struct mount *mp, struct vnode **vpp)
{
struct devfsmount *devfs_mp_p = (struct devfsmount *)(mp->mnt_data);
@ -148,13 +154,15 @@ DBPRINT(("root "));
return 0;
}
int devfs_quotactl( struct mount *mp, int cmds, uid_t uid, caddr_t arg, struct proc *p) /*proto*/
static int
devfs_quotactl( struct mount *mp, int cmds, uid_t uid, caddr_t arg, struct proc *p)
{
DBPRINT(("quotactl "));
return EOPNOTSUPP;
}
int devfs_statfs( struct mount *mp, struct statfs *sbp, struct proc *p) /*proto*/
static int
devfs_statfs( struct mount *mp, struct statfs *sbp, struct proc *p)
{
struct devfsmount *devfs_mp_p = (struct devfsmount *)mp->mnt_data;
@ -188,13 +196,15 @@ DBPRINT(("statfs "));
return 0;
}
int devfs_sync(struct mount *mp, int waitfor,struct ucred *cred,struct proc *p) /*proto*/
static int
devfs_sync(struct mount *mp, int waitfor,struct ucred *cred,struct proc *p)
{
DBPRINT(("sync "));
return 0;
}
int devfs_vget(struct mount *mp, ino_t ino,struct vnode **vpp) /*proto*/
static int
devfs_vget(struct mount *mp, ino_t ino,struct vnode **vpp)
{
DBPRINT(("vget "));
return EOPNOTSUPP;
@ -205,20 +215,22 @@ DBPRINT(("vget "));
* So don't handle filehandles
*/
int devfs_fhtovp (struct mount *mp, struct fid *fhp, struct mbuf *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp) /*proto*/
static int
devfs_fhtovp (struct mount *mp, struct fid *fhp, struct mbuf *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)
{
DBPRINT(("fhtovp "));
return (EINVAL);
}
int devfs_vptofh (struct vnode *vp, struct fid *fhp) /*proto*/
static int
devfs_vptofh (struct vnode *vp, struct fid *fhp)
{
DBPRINT(("vptofh "));
return (EINVAL);
}
struct vfsops devfs_vfsops = {
static struct vfsops devfs_vfsops = {
devfs_mount,
devfs_start,
devfs_unmount,

View File

@ -1,7 +1,7 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.15 1995/10/10 07:12:27 julian Exp $
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.16 1995/11/09 08:16:50 bde Exp $
*
* symlinks can wait 'til later.
*/
@ -65,7 +65,8 @@
*
* NOTE: (LOOKUP | LOCKPARENT) currently returns the parent node unlocked.
*/
int devfs_lookup(struct vop_lookup_args *ap) /*proto*/
static int
devfs_lookup(struct vop_lookup_args *ap)
/*struct vop_lookup_args {
struct vnode * a_dvp; directory vnode ptr
struct vnode ** a_vpp; where to put the result
@ -366,7 +367,8 @@ DBPRINT(("GOT\n"));
*
* Always error... no such thing in this FS
*/
int devfs_create(struct vop_mknod_args *ap) /*proto*/
static int
devfs_create(struct vop_mknod_args *ap)
/*struct vop_mknod_args {
struct vnode *a_dvp;
struct vnode **a_vpp;
@ -378,7 +380,8 @@ DBPRINT(("create\n"));
return EINVAL;
}
int devfs_mknod( struct vop_mknod_args *ap) /*proto*/
static int
devfs_mknod( struct vop_mknod_args *ap)
/*struct vop_mknod_args {
struct vnode *a_dvp;
struct vnode **a_vpp;
@ -419,7 +422,8 @@ DBPRINT(("mknod\n"));
return error;
}
int devfs_open(struct vop_open_args *ap) /*proto*/
static int
devfs_open(struct vop_open_args *ap)
/*struct vop_open_args {
struct vnode *a_vp;
int a_mode;
@ -431,7 +435,8 @@ DBPRINT(("open\n"));
return 0;
}
int devfs_close( struct vop_close_args *ap) /*proto*/
static int
devfs_close( struct vop_close_args *ap)
/*struct vop_close_args {
struct vnode *a_vp;
int a_fflag;
@ -443,7 +448,8 @@ DBPRINT(("close\n"));
return 0;
}
int devfs_access(struct vop_access_args *ap) /*proto*/
static int
devfs_access(struct vop_access_args *ap)
/*struct vop_access_args {
struct vnode *a_vp;
int a_mode;
@ -504,7 +510,8 @@ found:
return (EACCES);
}
int devfs_getattr(struct vop_getattr_args *ap) /*proto*/
static int
devfs_getattr(struct vop_getattr_args *ap)
/*struct vop_getattr_args {
struct vnode *a_vp;
struct vattr *a_vap;
@ -584,7 +591,8 @@ DBPRINT(("getattr\n"));
return 0;
}
int devfs_setattr(struct vop_setattr_args *ap) /*proto*/
static int
devfs_setattr(struct vop_setattr_args *ap)
/*struct vop_setattr_args {
struct vnode *a_vp;
struct vattr *a_vap;
@ -663,7 +671,8 @@ DBPRINT(("setattr\n"));
}
int devfs_read(struct vop_read_args *ap) /*proto*/
static int
devfs_read(struct vop_read_args *ap)
/*struct vop_read_args {
struct vnode *a_vp;
struct uio *a_uio;
@ -704,7 +713,8 @@ DBPRINT(("read\n"));
/*
* Write data to a file or directory.
*/
int devfs_write(struct vop_write_args *ap) /*proto*/
static int
devfs_write(struct vop_write_args *ap)
/*struct vop_write_args {
struct vnode *a_vp;
struct uio *a_uio;
@ -741,7 +751,8 @@ DBPRINT(("write\n"));
}
/* presently not called from devices anyhow */
int devfs_ioctl(struct vop_ioctl_args *ap) /*proto*/
static int
devfs_ioctl(struct vop_ioctl_args *ap)
/*struct vop_ioctl_args {
struct vnode *a_vp;
int a_command;
@ -755,7 +766,8 @@ DBPRINT(("ioctl\n"));
return ENOTTY;
}
int devfs_select(struct vop_select_args *ap) /*proto*/
static int
devfs_select(struct vop_select_args *ap)
/*struct vop_select_args {
struct vnode *a_vp;
int a_which;
@ -768,7 +780,8 @@ DBPRINT(("select\n"));
return 1; /* filesystems never block? */
}
int devfs_mmap(struct vop_mmap_args *ap) /*proto*/
static int
devfs_mmap(struct vop_mmap_args *ap)
/*struct vop_mmap_args {
struct vnode *a_vp;
int a_fflags;
@ -783,7 +796,8 @@ DBPRINT(("mmap\n"));
/*
* Flush the blocks of a file to disk.
*/
int devfs_fsync(struct vop_fsync_args *ap) /*proto*/
static int
devfs_fsync(struct vop_fsync_args *ap)
/*struct vop_fsync_args {
struct vnode *a_vp;
struct ucred *a_cred;
@ -795,7 +809,8 @@ DBPRINT(("fsync\n"));
return(0);
}
int devfs_seek(struct vop_seek_args *ap) /*proto*/
static int
devfs_seek(struct vop_seek_args *ap)
/*struct vop_seek_args {
struct vnode *a_vp;
off_t a_oldoff;
@ -808,7 +823,8 @@ DBPRINT(("seek\n"));
return 0;
}
int devfs_remove(struct vop_remove_args *ap) /*proto*/
static int
devfs_remove(struct vop_remove_args *ap)
/*struct vop_remove_args {
struct vnode *a_dvp;
struct vnode *a_vp;
@ -912,7 +928,8 @@ abortit:
/*
*/
int devfs_link(struct vop_link_args *ap) /*proto*/
static int
devfs_link(struct vop_link_args *ap)
/*struct vop_link_args {
struct vnode *a_tdvp;
struct vnode *a_vp;
@ -1009,7 +1026,8 @@ out:
* is different from the source, patch the ".." entry in the
* directory.
*/
int devfs_rename(struct vop_rename_args *ap) /*proto*/
static int
devfs_rename(struct vop_rename_args *ap)
/*struct vop_rename_args {
struct vnode *a_fdvp;
struct vnode *a_fvp;
@ -1226,7 +1244,8 @@ out:
}
int devfs_mkdir(struct vop_mkdir_args *ap) /*proto*/
static int
devfs_mkdir(struct vop_mkdir_args *ap)
/*struct vop_mkdir_args {
struct vnode *a_dvp;
struct vnode **a_vpp;
@ -1238,7 +1257,8 @@ DBPRINT(("mkdir\n"));
return EINVAL;
}
int devfs_rmdir(struct vop_rmdir_args *ap) /*proto*/
static int
devfs_rmdir(struct vop_rmdir_args *ap)
/*struct vop_rmdir_args {
struct vnode *a_dvp;
struct vnode *a_vp;
@ -1249,7 +1269,8 @@ DBPRINT(("rmdir\n"));
return 0;
}
int devfs_symlink(struct vop_symlink_args *ap) /*proto*/
static int
devfs_symlink(struct vop_symlink_args *ap)
/*struct vop_symlink_args {
struct vnode *a_dvp;
struct vnode **a_vpp;
@ -1265,7 +1286,8 @@ DBPRINT(("symlink\n"));
/*
* Vnode op for readdir
*/
int devfs_readdir(struct vop_readdir_args *ap) /*proto*/
static int
devfs_readdir(struct vop_readdir_args *ap)
/*struct vop_readdir_args {
struct vnode *a_vp;
struct uio *a_uio;
@ -1371,7 +1393,8 @@ DBPRINT(("readdir\n"));
/*
*/
int devfs_readlink(struct vop_readlink_args *ap) /*proto*/
static int
devfs_readlink(struct vop_readlink_args *ap)
/*struct vop_readlink_args {
struct vnode *a_vp;
struct uio *a_uio;
@ -1382,7 +1405,8 @@ DBPRINT(("readlink\n"));
return 0;
}
int devfs_abortop(struct vop_abortop_args *ap) /*proto*/
static int
devfs_abortop(struct vop_abortop_args *ap)
/*struct vop_abortop_args {
struct vnode *a_dvp;
struct componentname *a_cnp;
@ -1394,7 +1418,8 @@ DBPRINT(("abortop\n"));
return 0;
}
int devfs_inactive(struct vop_inactive_args *ap) /*proto*/
static int
devfs_inactive(struct vop_inactive_args *ap)
/*struct vop_inactive_args {
struct vnode *a_vp;
} */
@ -1402,19 +1427,22 @@ int devfs_inactive(struct vop_inactive_args *ap) /*proto*/
DBPRINT(("inactive\n"));
return 0;
}
int devfs_lock(struct vop_lock_args *ap) /*proto*/
static int
devfs_lock(struct vop_lock_args *ap)
{
DBPRINT(("lock\n"));
return 0;
}
int devfs_unlock( struct vop_unlock_args *ap) /*proto*/
static int
devfs_unlock( struct vop_unlock_args *ap)
{
DBPRINT(("unlock\n"));
return 0;
}
int devfs_islocked(struct vop_islocked_args *ap) /*proto*/
static int
devfs_islocked(struct vop_islocked_args *ap)
/*struct vop_islocked_args {
struct vnode *a_vp;
} */
@ -1423,7 +1451,8 @@ DBPRINT(("islocked\n"));
return 0;
}
int devfs_bmap(struct vop_bmap_args *ap) /*proto*/
static int
devfs_bmap(struct vop_bmap_args *ap)
/*struct vop_bmap_args {
struct vnode *a_vp;
daddr_t a_bn;
@ -1437,7 +1466,8 @@ DBPRINT(("bmap\n"));
return 0;
}
int devfs_strategy(struct vop_strategy_args *ap) /*proto*/
static int
devfs_strategy(struct vop_strategy_args *ap)
/*struct vop_strategy_args {
struct buf *a_bp;
} */
@ -1452,7 +1482,8 @@ DBPRINT(("strategy\n"));
}
int devfs_advlock(struct vop_advlock_args *ap) /*proto*/
static int
devfs_advlock(struct vop_advlock_args *ap)
/*struct vop_advlock_args {
struct vnode *a_vp;
caddr_t a_id;
@ -1465,7 +1496,8 @@ DBPRINT(("advlock\n"));
return EINVAL; /* we don't do locking yet */
}
int devfs_reclaim(struct vop_reclaim_args *ap) /*proto*/
static int
devfs_reclaim(struct vop_reclaim_args *ap)
/*struct vop_reclaim_args {
struct vnode *a_vp;
} */
@ -1488,7 +1520,8 @@ DBPRINT(("reclaim\n"));
/*
* Return POSIX pathconf information applicable to special devices.
*/
int devfs_pathconf(struct vop_pathconf_args *ap) /*proto*/
static int
devfs_pathconf(struct vop_pathconf_args *ap)
/*struct vop_pathconf_args {
struct vnode *a_vp;
int a_name;
@ -1525,7 +1558,8 @@ int devfs_pathconf(struct vop_pathconf_args *ap) /*proto*/
/*
* Print out the contents of a /devfs vnode.
*/
int devfs_print(struct vop_print_args *ap) /*proto*/
static int
devfs_print(struct vop_print_args *ap)
/*struct vop_print_args {
struct vnode *a_vp;
} */
@ -1535,7 +1569,8 @@ int devfs_print(struct vop_print_args *ap) /*proto*/
return (0);
}
int devfs_vfree(struct vop_vfree_args *ap) /*proto*/
static int
devfs_vfree(struct vop_vfree_args *ap)
/*struct vop_vfree_args {
struct vnode *a_pvp;
ino_t a_ino;
@ -1553,7 +1588,8 @@ int devfs_vfree(struct vop_vfree_args *ap) /*proto*/
/*
* /devfs vnode unsupported operation
*/
int devfs_enotsupp(void *junk) /*proto*/
static int
devfs_enotsupp(void *junk)
{
return (EOPNOTSUPP);
@ -1562,7 +1598,8 @@ int devfs_enotsupp(void *junk) /*proto*/
/*
* /devfs "should never get here" operation
*/
int devfs_badop(void *junk) /*proto*/
static int
devfs_badop(void *junk)
{
panic("devfs: bad op");
@ -1572,14 +1609,15 @@ int devfs_badop(void *junk) /*proto*/
/*
* devfs vnode null operation
*/
int devfs_nullop(void *junk) /*proto*/
static int
devfs_nullop(void *junk)
{
return (0);
}
void devfs_dropvnode(dn_p dnp) /*proto*/
void devfs_dropvnode(dn_p dnp)
{
struct vnode *vn_p;
@ -1635,7 +1673,7 @@ void devfs_dropvnode(dn_p dnp) /*proto*/
/* These are the operations used by directories etc in a devfs */
vop_t **devfs_vnodeop_p;
struct vnodeopv_entry_desc devfs_vnodeop_entries[] = {
static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *)vn_default_error },
{ &vop_lookup_desc, (vop_t *)devfs_lookup }, /* lookup */
{ &vop_create_desc, (vop_t *)devfs_create }, /* create */
@ -1679,7 +1717,7 @@ struct vnodeopv_entry_desc devfs_vnodeop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)devfs_bwrite }, /* bwrite */
{ NULL, NULL }
};
struct vnodeopv_desc devfs_vnodeop_opv_desc =
static struct vnodeopv_desc devfs_vnodeop_opv_desc =
{ &devfs_vnodeop_p, devfs_vnodeop_entries };
VNODEOP_SET(devfs_vnodeop_opv_desc);
@ -1725,7 +1763,7 @@ VNODEOP_SET(devfs_vnodeop_opv_desc);
vop_t **dev_spec_vnodeop_p;
struct vnodeopv_entry_desc dev_spec_vnodeop_entries[] = {
static struct vnodeopv_entry_desc dev_spec_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *)vn_default_error },
{ &vop_lookup_desc, (vop_t *)spec_lookup }, /* lookup */
{ &vop_create_desc, (vop_t *)spec_create }, /* create */
@ -1769,7 +1807,7 @@ struct vnodeopv_entry_desc dev_spec_vnodeop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)spec_bwrite }, /* bwrite */
{ NULL, NULL }
};
struct vnodeopv_desc dev_spec_vnodeop_opv_desc =
static struct vnodeopv_desc dev_spec_vnodeop_opv_desc =
{ &dev_spec_vnodeop_p, dev_spec_vnodeop_entries };
VNODEOP_SET(dev_spec_vnodeop_opv_desc);

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)fifo.h 8.2 (Berkeley) 2/2/94
* $Id: fifo.h,v 1.8 1995/12/11 09:24:09 phk Exp $
* $Id: fifo.h,v 1.9 1995/12/11 10:26:32 phk Exp $
*/
extern vop_t **fifo_vnodeop_p;
@ -40,7 +40,6 @@ extern vop_t **fifo_vnodeop_p;
* Prototypes for fifo operations on vnodes.
*/
int fifo_badop __P((void));
int fifo_ebadf __P((void));
int fifo_printinfo __P((struct vnode *));
int fifo_lookup __P((struct vop_lookup_args *));
#define fifo_create ((int (*) __P((struct vop_create_args *)))fifo_badop)
@ -68,11 +67,8 @@ int fifo_select __P((struct vop_select_args *));
#define fifo_abortop ((int (*) __P((struct vop_abortop_args *)))fifo_badop)
#define fifo_inactive ((int (*) __P((struct vop_inactive_args *)))nullop)
#define fifo_reclaim ((int (*) __P((struct vop_reclaim_args *)))nullop)
int fifo_lock __P((struct vop_lock_args *));
int fifo_unlock __P((struct vop_unlock_args *));
int fifo_bmap __P((struct vop_bmap_args *));
#define fifo_strategy ((int (*) __P((struct vop_strategy_args *)))fifo_badop)
int fifo_print __P((struct vop_print_args *));
#define fifo_islocked ((int (*) __P((struct vop_islocked_args *)))nullop)
int fifo_pathconf __P((struct vop_pathconf_args *));
int fifo_advlock __P((struct vop_advlock_args *));

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)fifo_vnops.c 8.2 (Berkeley) 1/4/94
* $Id: fifo_vnops.c,v 1.13 1995/12/11 09:24:13 phk Exp $
* $Id: fifo_vnops.c,v 1.14 1995/12/11 10:26:34 phk Exp $
*/
#include <sys/param.h>
@ -62,8 +62,13 @@ struct fifoinfo {
long fi_writers;
};
static int fifo_ebadf __P((void));
static int fifo_unlock __P((struct vop_unlock_args *));
static int fifo_lock __P((struct vop_lock_args *));
static int fifo_print __P((struct vop_print_args *));
vop_t **fifo_vnodeop_p;
struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *)vn_default_error },
{ &vop_lookup_desc, (vop_t *)fifo_lookup }, /* lookup */
{ &vop_create_desc, (vop_t *)fifo_create }, /* create */
@ -107,7 +112,7 @@ struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
{ &vop_bwrite_desc, (vop_t *)fifo_bwrite }, /* bwrite */
{ NULL, NULL }
};
struct vnodeopv_desc fifo_vnodeop_opv_desc =
static struct vnodeopv_desc fifo_vnodeop_opv_desc =
{ &fifo_vnodeop_p, fifo_vnodeop_entries };
VNODEOP_SET(fifo_vnodeop_opv_desc);
@ -382,7 +387,7 @@ fifo_bmap(ap)
* At the moment we do not do any locking.
*/
/* ARGSUSED */
int
static int
fifo_lock(ap)
struct vop_lock_args /* {
struct vnode *a_vp;
@ -393,7 +398,7 @@ fifo_lock(ap)
}
/* ARGSUSED */
int
static int
fifo_unlock(ap)
struct vop_unlock_args /* {
struct vnode *a_vp;
@ -459,7 +464,7 @@ fifo_printinfo(vp)
/*
* Print out the contents of a fifo vnode.
*/
int
static int
fifo_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
@ -503,7 +508,7 @@ fifo_pathconf(ap)
/*
* Fifo failed operation
*/
int
static int
fifo_ebadf()
{

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94
* $Id: spec_vnops.c,v 1.24 1995/12/11 09:24:50 phk Exp $
* $Id: spec_vnops.c,v 1.25 1995/12/13 15:13:31 julian Exp $
*/
#include <sys/param.h>
@ -60,6 +60,9 @@
#include <miscfs/specfs/specdev.h>
static int spec_ebadf __P((void));
static int spec_getattr __P((struct vop_getattr_args *));
struct vnode *speclisth[SPECHSZ];
vop_t **spec_vnodeop_p;
static struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
@ -842,7 +845,7 @@ spec_getpages(ap)
}
/* ARGSUSED */
int
static int
spec_getattr(ap)
struct vop_getattr_args /* {
struct vnode *a_vp;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)specdev.h 8.2 (Berkeley) 2/2/94
* $Id: specdev.h,v 1.6 1995/11/21 12:54:02 bde Exp $
* $Id: specdev.h,v 1.7 1995/12/11 04:56:43 dyson Exp $
*/
/*
@ -82,17 +82,12 @@ struct buf;
struct uio;
int spec_badop __P((void));
int spec_ebadf __P((void));
int spec_lookup __P((struct vop_lookup_args *));
#define spec_create ((int (*) __P((struct vop_create_args *)))spec_badop)
#define spec_mknod ((int (*) __P((struct vop_mknod_args *)))spec_badop)
int spec_open __P((struct vop_open_args *));
int spec_close __P((struct vop_close_args *));
#define spec_access ((int (*) __P((struct vop_access_args *)))spec_ebadf)
/*
#define spec_getattr ((int (*) __P((struct vop_getattr_args *)))spec_ebadf)
*/
int spec_getattr __P((struct vop_getattr_args *));
#define spec_setattr ((int (*) __P((struct vop_setattr_args *)))spec_ebadf)
int spec_read __P((struct vop_read_args *));
int spec_write __P((struct vop_write_args *));

View File

@ -37,7 +37,7 @@
*
* @(#)bpf.c 8.2 (Berkeley) 3/28/94
*
* $Id: bpf.c,v 1.19 1995/12/08 11:18:01 julian Exp $
* $Id: bpf.c,v 1.20 1995/12/08 23:21:46 phk Exp $
*/
#include "bpfilter.h"
@ -80,6 +80,7 @@
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/conf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
@ -105,27 +106,16 @@ static caddr_t bpf_alloc();
/*
* The default read buffer size is patchable.
*/
int bpf_bufsize = BPF_BUFSIZE;
static int bpf_bufsize = BPF_BUFSIZE;
SYSCTL_INT(_debug, OID_AUTO, bpf_bufsize, CTLFLAG_RW,
&bpf_bufsize, 0, "");
/*
* bpf_iflist is the list of interfaces; each corresponds to an ifnet
* bpf_dtab holds the descriptors, indexed by minor device #
*/
struct bpf_if *bpf_iflist;
struct bpf_d bpf_dtab[NBPFILTER];
#if BSD >= 199207
/*
* bpfilterattach() is called at boot time in new systems. We do
* nothing here since old systems will not call this.
*/
/* ARGSUSED */
void
bpfilterattach(n)
int n;
{
}
#endif
static struct bpf_if *bpf_iflist;
static struct bpf_d bpf_dtab[NBPFILTER];
static int bpf_allocbufs __P((struct bpf_d *));
static void bpf_attachd __P((struct bpf_d *d, struct bpf_if *bp));
@ -141,6 +131,7 @@ static inline void
static void catchpacket __P((struct bpf_d *, u_char *, u_int,
u_int, void (*)(const void *, void *, u_int)));
static void reset_d __P((struct bpf_d *));
static int bpf_setf __P((struct bpf_d *, struct bpf_program *));
static d_open_t bpfopen;
static d_close_t bpfclose;
@ -875,7 +866,7 @@ bpfioctl(dev, cmd, addr, flags, p)
* Set d's packet filter program to fp. If this file already has a filter,
* free it and replace it. Returns EINVAL for bogus requests.
*/
int
static int
bpf_setf(d, fp)
struct bpf_d *d;
struct bpf_program *fp;

View File

@ -37,7 +37,7 @@
*
* @(#)bpfdesc.h 8.1 (Berkeley) 6/10/93
*
* $Id: bpfdesc.h,v 1.4 1994/08/21 05:11:39 paul Exp $
* $Id: bpfdesc.h,v 1.5 1995/06/15 18:11:00 pst Exp $
*/
#ifndef _NET_BPFDESC_H_
@ -101,8 +101,4 @@ struct bpf_if {
struct ifnet *bif_ifp; /* correspoding interface */
};
#ifdef KERNEL
int bpf_setf __P((struct bpf_d *, struct bpf_program *));
#endif
#endif

View File

@ -69,7 +69,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
/* $Id: if_ppp.c,v 1.27 1995/11/03 08:42:21 peter Exp $ */
/* $Id: if_ppp.c,v 1.28 1995/11/13 22:09:39 peter Exp $ */
/* from if_ppp.c,v 1.5 1995/08/16 01:36:38 paulus Exp */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
@ -127,8 +127,8 @@
static void pppattach __P((void *));
PSEUDO_SET(pppattach, if_ppp);
int pppsioctl __P((struct ifnet *ifp, int cmd, caddr_t data));
void pppintr __P((void));
static int pppsioctl __P((struct ifnet *ifp, int cmd, caddr_t data));
static void pppintr __P((void));
static void ppp_requeue __P((struct ppp_softc *));
static void ppp_outpkt __P((struct ppp_softc *));
@ -167,7 +167,7 @@ static void pppdumpm __P((struct mbuf *m0));
extern struct compressor ppp_bsd_compress;
struct compressor *ppp_compressors[8] = {
static struct compressor *ppp_compressors[8] = {
#if DO_BSD_COMPRESS
&ppp_bsd_compress,
#endif
@ -469,7 +469,7 @@ pppioctl(sc, cmd, data, flag, p)
/*
* Process an ioctl request to the ppp network interface.
*/
int
static int
pppsioctl(ifp, cmd, data)
register struct ifnet *ifp;
int cmd;
@ -833,7 +833,7 @@ ppp_dequeue(sc)
/*
* Software interrupt routine, called at splnet.
*/
void
static void
pppintr()
{
struct ppp_softc *sc;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
* $Id: if_sl.c,v 1.33 1995/10/31 19:22:30 peter Exp $
* $Id: if_sl.c,v 1.34 1995/11/05 20:25:55 bde Exp $
*/
/*
@ -188,6 +188,14 @@ static int slinit __P((struct sl_softc *));
static struct mbuf *sl_btom __P((struct sl_softc *, int));
static timeout_t sl_keepalive;
static timeout_t sl_outfill;
static int slclose __P((struct tty *,int));
static int slinput __P((int, struct tty *));
static int slioctl __P((struct ifnet *, int, caddr_t));
static int sltioctl __P((struct tty *, int, caddr_t, int, struct proc *));
static int slopen __P((dev_t, struct tty *));
static int sloutput __P((struct ifnet *,
struct mbuf *, struct sockaddr *, struct rtentry *));
static int slstart __P((struct tty *));
static struct linesw slipdisc = {
slopen, slclose, l_noread, l_nowrite,
@ -251,7 +259,7 @@ slinit(sc)
* Attach the given tty to the first available sl unit.
*/
/* ARGSUSED */
int
static int
slopen(dev, tp)
dev_t dev;
register struct tty *tp;
@ -306,7 +314,7 @@ slopen(dev, tp)
* Line specific close routine.
* Detach the tty from the sl unit.
*/
int
static int
slclose(tp,flag)
struct tty *tp;
int flag;
@ -351,7 +359,7 @@ slclose(tp,flag)
* Provide a way to get the sl unit number.
*/
/* ARGSUSED */
int
static int
sltioctl(tp, cmd, data, flag, p)
struct tty *tp;
int cmd;
@ -416,7 +424,7 @@ sltioctl(tp, cmd, data, flag, p)
* will cause us to not compress "background" packets, because
* ordering gets trashed. It can be done for all packets in slstart.
*/
int
static int
sloutput(ifp, m, dst, rtp)
struct ifnet *ifp;
register struct mbuf *m;
@ -477,7 +485,7 @@ sloutput(ifp, m, dst, rtp)
* to send from the interface queue and map it to
* the interface before starting output.
*/
int
static int
slstart(tp)
register struct tty *tp;
{
@ -715,7 +723,7 @@ sl_btom(sc, len)
/*
* tty interface receiver interrupt.
*/
int
static int
slinput(c, tp)
register int c;
register struct tty *tp;
@ -894,7 +902,7 @@ newpack:
/*
* Process an ioctl request.
*/
int
static int
slioctl(ifp, cmd, data)
register struct ifnet *ifp;
int cmd;

View File

@ -32,7 +32,7 @@
*
* @(#)if_slvar.h 8.3 (Berkeley) 2/1/94
*
* $Id: if_slvar.h,v 1.6 1995/05/30 08:08:13 rgrimes Exp $
* $Id: if_slvar.h,v 1.7 1995/08/30 00:33:21 bde Exp $
*/
#ifndef _NET_IF_SLVAR_H_
@ -74,15 +74,5 @@ struct sl_softc {
#define SC_NOICMP IFF_LINK1 /* supress ICMP traffic */
#define SC_AUTOCOMP IFF_LINK2 /* auto-enable TCP compression */
#ifdef KERNEL
int slclose __P((struct tty *,int));
int slinput __P((int, struct tty *));
int slioctl __P((struct ifnet *, int, caddr_t));
int sltioctl __P((struct tty *, int, caddr_t, int, struct proc *));
int slopen __P((dev_t, struct tty *));
int sloutput __P((struct ifnet *,
struct mbuf *, struct sockaddr *, struct rtentry *));
int slstart __P((struct tty *));
#endif /* KERNEL */
#endif

View File

@ -62,8 +62,6 @@ struct sppp {
void sppp_attach (struct ifnet *ifp);
void sppp_detach (struct ifnet *ifp);
void sppp_input (struct ifnet *ifp, struct mbuf *m);
int sppp_output (struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
struct rtentry *rt);
int sppp_ioctl (struct ifnet *ifp, int cmd, void *data);
struct mbuf *sppp_dequeue (struct ifnet *ifp);
int sppp_isempty (struct ifnet *ifp);

View File

@ -132,7 +132,7 @@ struct cisco_packet {
};
#define CISCO_PACKET_LEN 18
struct sppp *spppq;
static struct sppp *spppq;
/*
* The following disgusting hack gets around the problem that IP TOS
@ -156,21 +156,23 @@ static u_short interactive_ports[8] = {
untimeout (sppp_cp_timeout, (void*) (p)); \
(p)->pp_flags &= ~PP_TIMO; }
void sppp_keepalive (void *dummy);
void sppp_cp_send (struct sppp *sp, u_short proto, u_char type,
static void sppp_keepalive (void *dummy);
static void sppp_cp_send (struct sppp *sp, u_short proto, u_char type,
u_char ident, u_short len, void *data);
void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2);
void sppp_lcp_input (struct sppp *sp, struct mbuf *m);
void sppp_cisco_input (struct sppp *sp, struct mbuf *m);
void sppp_ipcp_input (struct sppp *sp, struct mbuf *m);
void sppp_lcp_open (struct sppp *sp);
void sppp_ipcp_open (struct sppp *sp);
int sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
static void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2);
static void sppp_lcp_input (struct sppp *sp, struct mbuf *m);
static void sppp_cisco_input (struct sppp *sp, struct mbuf *m);
static void sppp_ipcp_input (struct sppp *sp, struct mbuf *m);
static void sppp_lcp_open (struct sppp *sp);
static void sppp_ipcp_open (struct sppp *sp);
static int sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
int len, u_long *magic);
void sppp_cp_timeout (void *arg);
char *sppp_lcp_type_name (u_char type);
char *sppp_ipcp_type_name (u_char type);
void sppp_print_bytes (u_char *p, u_short len);
static void sppp_cp_timeout (void *arg);
static char *sppp_lcp_type_name (u_char type);
static char *sppp_ipcp_type_name (u_char type);
static void sppp_print_bytes (u_char *p, u_short len);
static int sppp_output (struct ifnet *ifp, struct mbuf *m,
struct sockaddr *dst, struct rtentry *rt);
/*
* Flush interface queue.
@ -354,7 +356,8 @@ invalid: if (ifp->if_flags & IFF_DEBUG)
/*
* Enqueue transmit packet.
*/
int sppp_output (struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt)
static int
sppp_output (struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt)
{
struct sppp *sp = (struct sppp*) ifp;
struct ppp_header *h;
@ -439,8 +442,8 @@ int sppp_output (struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct
goto nosupport;
h->protocol = htons (PPP_ISO);
break;
#endif
nosupport:
#endif
default:
m_freem (m);
splx (s);
@ -496,7 +499,8 @@ void sppp_attach (struct ifnet *ifp)
sp->ipcp.state = IPCP_STATE_CLOSED;
}
void sppp_detach (struct ifnet *ifp)
void
sppp_detach (struct ifnet *ifp)
{
struct sppp **q, *p, *sp = (struct sppp*) ifp;
@ -527,7 +531,8 @@ void sppp_flush (struct ifnet *ifp)
/*
* Check if the output queue is empty.
*/
int sppp_isempty (struct ifnet *ifp)
int
sppp_isempty (struct ifnet *ifp)
{
struct sppp *sp = (struct sppp*) ifp;
int empty, s = splimp ();
@ -836,7 +841,8 @@ badreq:
/*
* Handle incoming Cisco keepalive protocol packets.
*/
void sppp_cisco_input (struct sppp *sp, struct mbuf *m)
static void
sppp_cisco_input (struct sppp *sp, struct mbuf *m)
{
struct cisco_packet *h;
struct ifaddr *ifa;
@ -911,7 +917,8 @@ void sppp_cisco_input (struct sppp *sp, struct mbuf *m)
/*
* Send PPP LCP packet.
*/
void sppp_cp_send (struct sppp *sp, u_short proto, u_char type,
static void
sppp_cp_send (struct sppp *sp, u_short proto, u_char type,
u_char ident, u_short len, void *data)
{
struct ppp_header *h;
@ -963,7 +970,8 @@ void sppp_cp_send (struct sppp *sp, u_short proto, u_char type,
/*
* Send Cisco keepalive packet.
*/
void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2)
static void
sppp_cisco_send (struct sppp *sp, int type, long par1, long par2)
{
struct ppp_header *h;
struct cisco_packet *ch;
@ -1008,7 +1016,8 @@ void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2)
/*
* Process an ioctl request. Called on low priority level.
*/
int sppp_ioctl (struct ifnet *ifp, int cmd, void *data)
int
sppp_ioctl (struct ifnet *ifp, int cmd, void *data)
{
struct ifreq *ifr = (struct ifreq*) data;
struct sppp *sp = (struct sppp*) ifp;
@ -1090,7 +1099,8 @@ int sppp_ioctl (struct ifnet *ifp, int cmd, void *data)
* If the request contains unknown options, build and
* send Configure-reject packet, containing only unknown options.
*/
int sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
static int
sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
int len, u_long *magic)
{
u_char *buf, *r, *p;
@ -1136,7 +1146,8 @@ int sppp_lcp_conf_parse_options (struct sppp *sp, struct lcp_header *h,
return (rlen == 0);
}
void sppp_ipcp_input (struct sppp *sp, struct mbuf *m)
static void
sppp_ipcp_input (struct sppp *sp, struct mbuf *m)
{
struct lcp_header *h;
struct ifnet *ifp = &sp->pp_if;
@ -1236,7 +1247,8 @@ void sppp_ipcp_input (struct sppp *sp, struct mbuf *m)
}
}
void sppp_lcp_open (struct sppp *sp)
static void
sppp_lcp_open (struct sppp *sp)
{
char opt[6];
@ -1254,7 +1266,8 @@ void sppp_lcp_open (struct sppp *sp)
TIMO (sp, 2);
}
void sppp_ipcp_open (struct sppp *sp)
static void
sppp_ipcp_open (struct sppp *sp)
{
sp->ipcp.confid = ++sp->pp_seq;
sppp_cp_send (sp, PPP_IPCP, IPCP_CONF_REQ, sp->ipcp.confid, 0, 0);
@ -1264,7 +1277,8 @@ void sppp_ipcp_open (struct sppp *sp)
/*
* Process PPP control protocol timeouts.
*/
void sppp_cp_timeout (void *arg)
static void
sppp_cp_timeout (void *arg)
{
struct sppp *sp = (struct sppp*) arg;
int s = splimp ();
@ -1313,7 +1327,8 @@ void sppp_cp_timeout (void *arg)
splx (s);
}
char *sppp_lcp_type_name (u_char type)
static char
*sppp_lcp_type_name (u_char type)
{
static char buf [8];
switch (type) {
@ -1333,7 +1348,8 @@ char *sppp_lcp_type_name (u_char type)
return (buf);
}
char *sppp_ipcp_type_name (u_char type)
static char
*sppp_ipcp_type_name (u_char type)
{
static char buf [8];
switch (type) {
@ -1349,7 +1365,8 @@ char *sppp_ipcp_type_name (u_char type)
return (buf);
}
void sppp_print_bytes (u_char *p, u_short len)
static void
sppp_print_bytes (u_char *p, u_short len)
{
printf (" %x", *p++);
while (--len > 0)

View File

@ -70,7 +70,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
/* $Id: ppp_tty.c,v 1.2 1995/10/31 20:24:14 peter Exp $ */
/* $Id: ppp_tty.c,v 1.3 1995/11/01 00:58:43 peter Exp $ */
/* from Id: ppp_tty.c,v 1.3 1995/08/16 01:36:40 paulus Exp */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
@ -115,17 +115,17 @@
#include <net/if_ppp.h>
#include <net/if_pppvar.h>
void pppasyncattach __P((void *));
static void pppasyncattach __P((void *));
PSEUDO_SET(pppasyncattach, ppp_tty);
int pppopen __P((dev_t dev, struct tty *tp));
int pppclose __P((struct tty *tp, int flag));
int pppread __P((struct tty *tp, struct uio *uio, int flag));
int pppwrite __P((struct tty *tp, struct uio *uio, int flag));
int ppptioctl __P((struct tty *tp, int cmd, caddr_t data, int flag,
static int pppopen __P((dev_t dev, struct tty *tp));
static int pppclose __P((struct tty *tp, int flag));
static int pppread __P((struct tty *tp, struct uio *uio, int flag));
static int pppwrite __P((struct tty *tp, struct uio *uio, int flag));
static int ppptioctl __P((struct tty *tp, int cmd, caddr_t data, int flag,
struct proc *));
int pppinput __P((int c, struct tty *tp));
int pppstart __P((struct tty *tp));
static int pppinput __P((int c, struct tty *tp));
static int pppstart __P((struct tty *tp));
static u_short pppfcs __P((u_short fcs, u_char *cp, int len));
static void pppasyncstart __P((struct ppp_softc *));
@ -205,7 +205,7 @@ pppasyncattach(dummy)
* Called from device open routine or ttioctl() at >= splsofttty()
*/
/* ARGSUSED */
int
static int
pppopen(dev, tp)
dev_t dev;
register struct tty *tp;
@ -275,7 +275,7 @@ pppopen(dev, tp)
* Detach the tty from the ppp unit.
* Mimics part of ttyclose().
*/
int
static int
pppclose(tp, flag)
struct tty *tp;
int flag;
@ -347,7 +347,7 @@ register struct ppp_softc *sc;
* called at no spl from the device driver in the response to user-level
* reads on the tty file descriptor (ie: pppd).
*/
int
static int
pppread(tp, uio, flag)
register struct tty *tp;
struct uio *uio;
@ -406,7 +406,7 @@ pppread(tp, uio, flag)
* called at no spl from the device driver in the response to user-level
* writes on the tty file descriptor (ie: pppd).
*/
int
static int
pppwrite(tp, uio, flag)
register struct tty *tp;
struct uio *uio;
@ -465,7 +465,7 @@ pppwrite(tp, uio, flag)
* the line specific l_ioctl routine from their ioctl routines.
*/
/* ARGSUSED */
int
static int
ppptioctl(tp, cmd, data, flag, p)
struct tty *tp;
caddr_t data;
@ -621,7 +621,7 @@ pppasyncctlp(sc)
* Harmless to be called while the upper netisr code is preempted, but we
* do not want to be preempted by it again.
*/
int
static int
pppstart(tp)
register struct tty *tp;
{
@ -864,7 +864,7 @@ static unsigned paritytab[8] = {
* Only guaranteed to be at splsofttty() or spltty()
* This is safe to be called while the upper half's netisr is preempted.
*/
int
static int
pppinput(c, tp)
int c;
register struct tty *tp;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)radix.c 8.4 (Berkeley) 11/2/94
* $Id: radix.c,v 1.9 1995/05/30 08:08:20 rgrimes Exp $
* $Id: radix.c,v 1.10 1995/12/02 19:37:31 bde Exp $
*/
/*
@ -51,15 +51,23 @@
#include <net/radix.h>
#endif
extern struct radix_node *
static struct radix_node *
rn_lookup __P((void *v_arg, void *m_arg,
struct radix_node_head *head));
extern int rn_walktree_from __P((struct radix_node_head *h, void *a,
static int rn_walktree_from __P((struct radix_node_head *h, void *a,
void *m, walktree_f_t *f, void *w));
static int rn_walktree __P((struct radix_node_head *, walktree_f_t *, void *));
static struct radix_node
*rn_delete __P((void *, void *, struct radix_node_head *)),
*rn_insert __P((void *, struct radix_node_head *, int *,
struct radix_node [2])),
*rn_newpair __P((void *, int, struct radix_node[2])),
*rn_search __P((void *, struct radix_node *)),
*rn_search_m __P((void *, struct radix_node *, void *));
int max_keylen;
struct radix_mask *rn_mkfreelist;
struct radix_node_head *mask_rnhead;
static int max_keylen;
static struct radix_mask *rn_mkfreelist;
static struct radix_node_head *mask_rnhead;
static char *addmask_key;
static char normal_chars[] = {0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, -1};
static char *rn_zeros, *rn_ones;
@ -109,7 +117,7 @@ static int rn_satsifies_leaf __P((char *trial, struct radix_node *leaf,
* that governs a subtree.
*/
struct radix_node *
static struct radix_node *
rn_search(v_arg, head)
void *v_arg;
struct radix_node *head;
@ -126,7 +134,7 @@ rn_search(v_arg, head)
return (x);
};
struct radix_node *
static struct radix_node *
rn_search_m(v_arg, head, m_arg)
struct radix_node *head;
void *v_arg, *m_arg;
@ -322,7 +330,7 @@ int rn_saveinfo;
int rn_debug = 1;
#endif
struct radix_node *
static struct radix_node *
rn_newpair(v, b, nodes)
void *v;
int b;
@ -340,7 +348,7 @@ rn_newpair(v, b, nodes)
return t;
}
struct radix_node *
static struct radix_node *
rn_insert(v_arg, head, dupentry, nodes)
void *v_arg;
struct radix_node_head *head;
@ -665,7 +673,7 @@ on2:
return tt;
}
struct radix_node *
static struct radix_node *
rn_delete(v_arg, netmask_arg, head)
void *v_arg, *netmask_arg;
struct radix_node_head *head;
@ -829,7 +837,7 @@ out:
* This is the same as rn_walktree() except for the parameters and the
* exit.
*/
int
static int
rn_walktree_from(h, a, m, f, w)
struct radix_node_head *h;
void *a, *m;
@ -919,7 +927,7 @@ rn_walktree_from(h, a, m, f, w)
return 0;
}
int
static int
rn_walktree(h, f, w)
struct radix_node_head *h;
walktree_f_t *f;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)radix.h 8.2 (Berkeley) 10/31/94
* $Id$
* $Id: radix.h,v 1.8 1995/04/28 23:01:37 pst Exp $
*/
#ifndef _RADIX_H_
@ -155,17 +155,11 @@ extern struct radix_node_head *mask_rnhead;
void rn_init __P((void));
int rn_inithead __P((void **, int));
int rn_refines __P((void *, void *));
int rn_walktree __P((struct radix_node_head *, walktree_f_t *, void *));
struct radix_node
*rn_addmask __P((void *, int, int)),
*rn_addroute __P((void *, void *, struct radix_node_head *,
struct radix_node [2])),
*rn_delete __P((void *, void *, struct radix_node_head *)),
*rn_insert __P((void *, struct radix_node_head *, int *,
struct radix_node [2])),
*rn_match __P((void *, struct radix_node_head *)),
*rn_newpair __P((void *, int, struct radix_node[2])),
*rn_search __P((void *, struct radix_node *)),
*rn_search_m __P((void *, struct radix_node *, void *));
*rn_match __P((void *, struct radix_node_head *));
#endif /* _RADIX_H_ */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)raw_cb.c 8.1 (Berkeley) 6/10/93
* $Id: raw_cb.c,v 1.5 1995/07/29 11:40:59 bde Exp $
* $Id: raw_cb.c,v 1.6 1995/12/03 13:44:58 bde Exp $
*/
#include <sys/param.h>
@ -59,8 +59,8 @@
*/
struct rawcb rawcb;
u_long raw_sendspace = RAWSNDQ;
u_long raw_recvspace = RAWRCVQ;
static u_long raw_sendspace = RAWSNDQ;
static u_long raw_recvspace = RAWRCVQ;
/*
* Allocate a control block and a nominal amount

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)route.c 8.2 (Berkeley) 11/15/93
* $Id: route.c,v 1.27 1995/10/29 15:32:14 phk Exp $
* $Id: route.c,v 1.28 1995/12/02 19:28:24 bde Exp $
*/
#include <sys/param.h>
@ -56,13 +56,16 @@
#define SA(p) ((struct sockaddr *)(p))
struct route_cb route_cb;
struct rtstat rtstat;
static struct rtstat rtstat;
struct radix_node_head *rt_tables[AF_MAX+1];
int rttrash; /* routes not in table but not freed */
struct sockaddr wildcard; /* zero valued cookie for wildcard searches */
static int rttrash; /* routes not in table but not freed */
void
static void rt_maskedcopy __P((struct sockaddr *,
struct sockaddr *, struct sockaddr *));
static void rtable_init __P((void **));
static void
rtable_init(table)
void **table;
{
@ -700,7 +703,7 @@ rt_setgate(rt0, dst, gate)
return 0;
}
void
static void
rt_maskedcopy(src, dst, netmask)
struct sockaddr *src, *dst, *netmask;
{

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)route.h 8.3 (Berkeley) 4/19/94
* $Id: route.h,v 1.17 1995/10/26 20:30:24 julian Exp $
* $Id: route.h,v 1.18 1995/11/16 19:00:09 phk Exp $
*/
#ifndef _NET_ROUTE_H_
@ -261,13 +261,10 @@ extern struct radix_node_head *rt_tables[AF_MAX+1];
void route_init __P((void));
void rt_ifmsg __P((struct ifnet *));
void rt_maskedcopy __P((struct sockaddr *,
struct sockaddr *, struct sockaddr *));
void rt_missmsg __P((int, struct rt_addrinfo *, int, int));
void rt_newaddrmsg __P((int, struct ifaddr *, int, struct rtentry *));
int rt_setgate __P((struct rtentry *,
struct sockaddr *, struct sockaddr *));
void rtable_init __P((void **));
void rtalloc __P((struct route *));
void rtalloc_ign __P((struct route *, unsigned long));
struct rtentry *

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_ether.c 8.1 (Berkeley) 6/10/93
* $Id: if_ether.c,v 1.21 1995/12/02 19:37:48 bde Exp $
* $Id: if_ether.c,v 1.22 1995/12/09 16:06:52 phk Exp $
*/
/*
@ -89,7 +89,7 @@ struct llinfo_arp {
static LIST_HEAD(, llinfo_arp) llinfo_arp;
struct ifqueue arpintrq = {0, 0, 0, 50};
int arp_inuse, arp_allocated, arp_intimer;
static int arp_inuse, arp_allocated;
static int arp_maxtries = 5;
SYSCTL_INT(_net_arp, OID_AUTO, maxtries, CTLFLAG_RW, &arp_maxtries, 0, "");

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94
* $Id: ip_icmp.c,v 1.14 1995/12/06 23:37:29 bde Exp $
* $Id: ip_icmp.c,v 1.15 1995/12/08 16:46:06 wollman Exp $
*/
#include <sys/param.h>
@ -62,7 +62,7 @@
* host table maintenance routines.
*/
struct icmpstat icmpstat;
static struct icmpstat icmpstat;
SYSCTL_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RD,
&icmpstat, icmpstat, "");
@ -76,6 +76,7 @@ int icmpprintfs = 0;
static void icmp_reflect __P((struct mbuf *));
static void icmp_send __P((struct mbuf *, struct mbuf *));
static int ip_next_mtu __P((int, int));
extern struct protosw inetsw[];
@ -645,7 +646,7 @@ iptime()
* given current value MTU. If DIR is less than zero, a larger plateau
* is returned; otherwise, a smaller value is returned.
*/
int
static int
ip_next_mtu(mtu, dir)
int mtu;
int dir;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
* $Id: ip_input.c,v 1.28 1995/11/14 20:34:14 phk Exp $
* $Id: ip_input.c,v 1.29 1995/12/06 23:37:34 bde Exp $
*/
#include <sys/param.h>
@ -64,7 +64,7 @@
#include <sys/socketvar.h>
int rsvp_on = 0;
int ip_rsvp_on;
static int ip_rsvp_on;
struct socket *ip_rsvpd;
#ifndef IPFORWARDING
@ -116,7 +116,7 @@ SYSCTL_INT(_net_inet_ip, IPCTL_INTRQDROPS, intr_queue_drops, CTLFLAG_RD,
&ipintrq.ifq_drops, 0, "");
struct ipstat ipstat;
struct ipq ipq;
static struct ipq ipq;
#ifdef IPCTL_DEFMTU
SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, mtu, CTLFLAG_RW,
@ -175,7 +175,7 @@ ip_init()
}
static struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET };
struct route ipforward_rt;
static struct route ipforward_rt;
/*
* Ip input routine. Checksum and byte swap header. If fragmented

View File

@ -9,7 +9,7 @@
* Modified by Bill Fenner, PARC, April 1995
*
* MROUTING Revision: 3.5
* $Id: ip_mroute.c,v 1.25 1995/11/14 20:34:16 phk Exp $
* $Id: ip_mroute.c,v 1.26 1995/12/02 19:38:03 bde Exp $
*/
@ -72,7 +72,7 @@ extern int _mrt_ioctl __P((int req, caddr_t data, struct proc *p));
struct socket *ip_mrouter = NULL;
static u_int ip_mrtproto = 0;
struct mrtstat mrtstat;
static struct mrtstat mrtstat;
u_int rsvpdebug = 0;
int
@ -219,9 +219,9 @@ static int ip_mrtproto;
#define NO_RTE_FOUND 0x1
#define RTE_FOUND 0x2
struct mbuf *mfctable[MFCTBLSIZ];
u_char nexpire[MFCTBLSIZ];
struct vif viftable[MAXVIFS];
static struct mbuf *mfctable[MFCTBLSIZ];
static u_char nexpire[MFCTBLSIZ];
static struct vif viftable[MAXVIFS];
static u_int mrtdebug = 0; /* debug level */
#define DEBUG_MFC 0x02
#define DEBUG_FORWARD 0x04
@ -238,7 +238,7 @@ static u_int rsvpdebug = 0; /* rsvp debug level */
* tbftable -> each vif has one of these for storing info
*/
struct tbf tbftable[MAXVIFS];
static struct tbf tbftable[MAXVIFS];
#define TBF_REPROCESS (hz / 100) /* 100x / second */
/*
@ -249,7 +249,7 @@ struct tbf tbftable[MAXVIFS];
* can't be sent this way. They only exist as a placeholder for
* multicast source verification.
*/
struct ifnet multicast_decap_if[MAXVIFS];
static struct ifnet multicast_decap_if[MAXVIFS];
#define ENCAP_TTL 64
#define ENCAP_PROTO IPPROTO_IPIP /* 4 */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_var.h 8.2 (Berkeley) 1/9/95
* $Id: ip_var.h,v 1.16 1995/11/14 20:34:21 phk Exp $
* $Id: ip_var.h,v 1.17 1995/12/05 17:46:25 wollman Exp $
*/
#ifndef _NETINET_IP_VAR_H_
@ -169,7 +169,6 @@ void ip_freemoptions __P((struct ip_moptions *));
void ip_init __P((void));
extern int (*ip_mforward) __P((struct ip *, struct ifnet *, struct mbuf *,
struct ip_moptions *));
int ip_next_mtu __P((int, int));
int ip_output __P((struct mbuf *,
struct mbuf *, struct route *, int, struct ip_moptions *));
void ip_slowtimo __P((void));

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
* $Id: tcp_input.c,v 1.32 1995/11/09 20:23:02 phk Exp $
* $Id: tcp_input.c,v 1.33 1995/11/14 20:34:37 phk Exp $
*/
#ifndef TUBA_INCLUDE
@ -65,7 +65,7 @@
#include <netinet/tcpip.h>
#ifdef TCPDEBUG
#include <netinet/tcp_debug.h>
struct tcpiphdr tcp_saveti;
static struct tcpiphdr tcp_saveti;
#endif
static int tcprexmtthresh = 3;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
* $Id: tcp_input.c,v 1.32 1995/11/09 20:23:02 phk Exp $
* $Id: tcp_input.c,v 1.33 1995/11/14 20:34:37 phk Exp $
*/
#ifndef TUBA_INCLUDE
@ -65,7 +65,7 @@
#include <netinet/tcpip.h>
#ifdef TCPDEBUG
#include <netinet/tcp_debug.h>
struct tcpiphdr tcp_saveti;
static struct tcpiphdr tcp_saveti;
#endif
static int tcprexmtthresh = 3;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
* $Id: udp_usrreq.c,v 1.16 1995/11/16 09:51:02 bde Exp $
* $Id: udp_usrreq.c,v 1.17 1995/12/06 23:37:44 bde Exp $
*/
#include <sys/param.h>
@ -72,14 +72,14 @@ static int udpcksum = 0; /* XXX */
SYSCTL_INT(_net_inet_udp, UDPCTL_CHECKSUM, checksum, CTLFLAG_RW,
&udpcksum, 0, "");
struct inpcbhead udb; /* from udp_var.h */
struct inpcbinfo udbinfo;
static struct inpcbhead udb; /* from udp_var.h */
static struct inpcbinfo udbinfo;
#ifndef UDBHASHSIZE
#define UDBHASHSIZE 64
#endif
struct udpstat udpstat; /* from udp_var.h */
static struct udpstat udpstat; /* from udp_var.h */
SYSCTL_STRUCT(_net_inet_udp, UDPCTL_STATS, stats, CTLFLAG_RD,
&udpstat, udpstat, "");

View File

@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
* $Id: aic7870.c,v 1.18 1995/11/05 04:51:58 gibbs Exp $
* $Id: aic7870.c,v 1.19 1995/11/07 05:33:27 gibbs Exp $
*/
#include <pci.h>
@ -57,11 +57,11 @@
#define DIFACTNEGEN 0x00000001ul /* aic7870 only */
static char* aic7870_probe __P((pcici_t tag, pcidi_t type));
void aic7870_attach __P((pcici_t config_id, int unit));
static void aic7870_attach __P((pcici_t config_id, int unit));
static u_char aic3940_count;
struct pci_device ahc_pci_driver = {
static struct pci_device ahc_pci_driver = {
"ahc",
aic7870_probe,
aic7870_attach,
@ -103,7 +103,7 @@ aic7870_probe (pcici_t tag, pcidi_t type)
}
void
static void
aic7870_attach(config_id, unit)
pcici_t config_id;
int unit;

View File

@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
* $Id$
* $Id: bt9xx.c,v 1.1 1995/12/12 08:58:04 gibbs Exp $
*/
#include <pci.h>
@ -42,7 +42,7 @@ static char* bt_pci_probe __P((pcici_t tag, pcidi_t type));
static void bt_pci_attach __P((pcici_t config_id, int unit));
static int bt_pci_intr __P((void *arg));
struct pci_device bt_pci_driver = {
static struct pci_device bt_pci_driver = {
"bt",
bt_pci_probe,
bt_pci_attach,
@ -72,7 +72,6 @@ bt_pci_attach(config_id, unit)
int unit;
{
u_long io_port;
u_long id;
unsigned opri = 0;
struct bt_data *bt;

View File

@ -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_de.c,v 1.38 1995/11/29 11:19:02 asami Exp $
* $Id: if_de.c,v 1.39 1995/12/07 12:47:34 davidg Exp $
*
*/
@ -350,7 +350,7 @@ static const char *tulip_chipdescs[] = {
#if defined(__FreeBSD__)
typedef void ifnet_ret_t;
typedef int ioctl_cmd_t;
tulip_softc_t *tulips[NDE];
static tulip_softc_t *tulips[NDE];
#define TULIP_UNIT_TO_SOFTC(unit) (tulips[unit])
#endif
#if defined(__bsdi__)

View File

@ -105,18 +105,15 @@ static int vxioctl __P((struct ifnet * ifp, int, caddr_t));
static void vxmbuffill __P((caddr_t, int));
static void vxmbufempty __P((struct vx_softc *));
void vxinit __P((int));
void vxintr __P((int));
void vxread __P((struct vx_softc *));
void vxreset __P((int));
void vxstart __P((struct ifnet *));
void vxstop __P((int));
void vxwatchdog __P((struct ifnet *));
static void vxinit __P((int));
static void vxintr __P((int));
static void vxread __P((struct vx_softc *));
static void vxreset __P((int));
static void vxstart __P((struct ifnet *));
static void vxstop __P((int));
static void vxwatchdog __P((struct ifnet *));
static int send_ID_sequence __P((int));
static int get_eeprom_data __P((int, int));
struct vx_softc vx_softc[NVX];
static struct vx_softc vx_softc[NVX];
#define vx_ftst(f) (sc->stat&(f))
#define vx_fset(f) (sc->stat|=(f))
@ -310,7 +307,7 @@ vx_pci_attach(
static u_long vx_pci_count;
struct pci_device vxdevice = {
static struct pci_device vxdevice = {
"vx",
vx_pci_probe,
vx_pci_attach,
@ -324,7 +321,7 @@ DATA_SET (pcidevice_set, vxdevice);
* The order in here seems important. Otherwise we may not receive
* interrupts. ?!
*/
void
static void
vxinit(unit)
int unit;
{
@ -477,7 +474,7 @@ vxinit(unit)
static const char padmap[] = {0, 3, 2, 1};
void
static void
vxstart(ifp)
struct ifnet *ifp;
{
@ -599,15 +596,12 @@ readcheck:
goto startagain;
}
void
static void
vxintr(unit)
int unit;
{
int i;
register int status;
register struct vx_softc *sc = &vx_softc[unit];
struct ifnet *ifp = &sc->arpcom.ac_if;
struct mbuf *m;
int x;
x=splbio();
@ -704,7 +698,7 @@ rescan:
splx(x);
}
void
static void
vxread(sc)
register struct vx_softc *sc;
{
@ -1057,7 +1051,7 @@ vxioctl(ifp, cmd, data)
return (error);
}
void
static void
vxreset(unit)
int unit;
{
@ -1068,7 +1062,7 @@ vxreset(unit)
splx(s);
}
void
static void
vxwatchdog(ifp)
struct ifnet *ifp;
{
@ -1085,7 +1079,7 @@ vxwatchdog(ifp)
vxintr(ifp->if_unit);
}
void
static void
vxstop(unit)
int unit;
{
@ -1104,48 +1098,6 @@ vxstop(unit)
outw(BASE + VX_COMMAND, SET_RX_FILTER);
}
static int
send_ID_sequence(port)
int port;
{
int cx, al;
for (al = 0xff, cx = 0; cx < 255; cx++) {
outb(port, al);
al <<= 1;
if (al & 0x100)
al ^= 0xcf;
}
return (1);
}
/*
* We get eeprom data from the id_port given an offset into the eeprom.
* Basically; after the ID_sequence is sent to all of the cards; they enter
* the ID_CMD state where they will accept command requests. 0x80-0xbf loads
* the eeprom data. We then read the port 16 times and with every read; the
* cards check for contention (ie: if one card writes a 0 bit and another
* writes a 1 bit then the host sees a 0. At the end of the cycle; each card
* compares the data on the bus; if there is a difference then that card goes
* into ID_WAIT state again). In the meantime; one bit of data is returned in
* the AX register which is conveniently returned to us by inb(). Hence; we
* read 16 times getting one bit of data with each read.
*/
static int
get_eeprom_data(id_port, offset)
int id_port;
int offset;
{
int i, data = 0;
outb(id_port, 0x80 + offset);
DELAY(1000);
for (i = 0; i < 16; i++)
data = (data << 1) | (inw(id_port) & 1);
return (data);
}
/*
* We suppose this is always called inside a splimp(){...}splx() region
*/

View File

@ -78,7 +78,7 @@
#include <machine/ioctl_meteor.h>
extern int meteor_intr __P((void *arg));
static int meteor_intr __P((void *arg));
/* enough memory for 640x48 RGB16, or YUV (16 storage bits/pixel) or
450x340 RGB24 (32 storage bits/pixel)
@ -148,9 +148,9 @@ typedef struct {
#endif
} meteor_reg_t;
meteor_reg_t meteor[NMETEOR];
static meteor_reg_t meteor[NMETEOR];
u_long read_intr_wait;
static u_long read_intr_wait;
#define METPRI (PZERO+8)|PCATCH
/*---------------------------------------------------------
@ -164,7 +164,7 @@ static char* met_probe (pcici_t tag, pcidi_t type);
static void met_attach(pcici_t tag, int unit);
static u_long met_count;
struct pci_device met_device = {
static struct pci_device met_device = {
"meteor",
met_probe,
met_attach,
@ -484,7 +484,7 @@ met_probe (pcici_t tag, pcidi_t type)
/* interrupt handling routine
complete meteor_read() if using interrupts
*/
int
static int
meteor_intr( void *arg)
{
register meteor_reg_t *mtr = (meteor_reg_t *) arg;

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: ncr.c,v 1.49 1995/09/21 17:27:28 se Exp $
** $Id: ncr.c,v 1.50 1995/12/07 12:47:40 davidg Exp $
**
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
**
@ -174,6 +174,7 @@
#include <sys/malloc.h>
#include <sys/buf.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
#ifndef __NetBSD__
#include <machine/clock.h>
#include <machine/cpu.h> /* bootverbose */
@ -1253,9 +1254,9 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
"\n$Id: ncr.c,v 1.49 1995/09/21 17:27:28 se Exp $\n";
"\n$Id: ncr.c,v 1.50 1995/12/07 12:47:40 davidg Exp $\n";
u_long ncr_version = NCR_VERSION * 11
static u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
+ (u_long) sizeof (struct ccb) * 5
+ (u_long) sizeof (struct lcb) * 3
@ -1264,13 +1265,13 @@ u_long ncr_version = NCR_VERSION * 11
#ifdef KERNEL
#ifndef __NetBSD__
u_long nncr=MAX_UNITS;
ncb_p ncrp [MAX_UNITS];
static ncb_p ncrp [MAX_UNITS];
#endif /* !__NetBSD__ */
static int ncr_debug = SCSI_DEBUG_FLAGS;
SYSCTL_INT(_debug, OID_AUTO, ncr_debug, CTLFLAG_RW, &ncr_debug, 0, "");
int ncr_cache; /* to be aligned _NOT_ static */
static int ncr_cache; /* to be aligned _NOT_ static */
/*==========================================================
**
@ -1298,7 +1299,7 @@ struct cfdriver ncrcd = {
static u_long ncr_count;
struct pci_device ncr_device = {
static struct pci_device ncr_device = {
"ncr",
ncr_probe,
ncr_attach,
@ -1310,7 +1311,7 @@ DATA_SET (pcidevice_set, ncr_device);
#endif /* !__NetBSD__ */
struct scsi_adapter ncr_switch =
static struct scsi_adapter ncr_switch =
{
ncr_start,
ncr_min_phys,
@ -1322,7 +1323,7 @@ struct scsi_adapter ncr_switch =
#endif /* !__NetBSD__ */
};
struct scsi_device ncr_dev =
static struct scsi_device ncr_dev =
{
NULL, /* Use default error handler */
NULL, /* have a queue, served by this */
@ -3506,7 +3507,7 @@ ncr_intr(arg)
{
ncb_p np = arg;
#else /* !__NetBSD__ */
int
static int
ncr_intr(np)
ncb_p np;
{

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: pci.c,v 1.35 1995/12/06 15:52:23 se Exp $
** $Id: pci.c,v 1.36 1995/12/07 12:47:42 davidg Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@ -139,7 +139,7 @@ pci_bridge_config (void);
unsigned pci_max_burst_len = 3; /* 2=16Byte, 3=32Byte, 4=64Byte, ... */
unsigned pci_mechanism = 0;
unsigned pci_maxdevice = 0;
struct pcibus* pcibus;
static struct pcibus* pcibus;
/*--------------------------------------------------------
**
@ -1132,7 +1132,7 @@ pci_internalize (struct kern_devconf *kdcp, struct sysctl_req *re)
**-----------------------------------------------------------------------
*/
struct pci_int_desc*
static struct pci_int_desc*
pci_int_desc [PCI_MAX_IRQ];
#ifndef NO_SHARED_IRQ

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: pcisupport.c,v 1.22 1995/09/14 17:26:24 se Exp $
** $Id: pcisupport.c,v 1.23 1995/12/05 20:40:10 bde Exp $
**
** Device driver for DEC/INTEL PCI chipsets.
**
@ -63,7 +63,7 @@ static char* chipset_probe (pcici_t tag, pcidi_t type);
static void chipset_attach(pcici_t tag, int unit);
static u_long chipset_count;
struct pci_device chipset_device = {
static struct pci_device chipset_device = {
"chip",
chipset_probe,
chipset_attach,
@ -448,7 +448,7 @@ static char* vga_probe (pcici_t tag, pcidi_t type);
static void vga_attach (pcici_t tag, int unit);
static u_long vga_count;
struct pci_device vga_device = {
static struct pci_device vga_device = {
"vga",
vga_probe,
vga_attach,
@ -505,7 +505,7 @@ static char* lkm_probe (pcici_t tag, pcidi_t type);
static void lkm_attach (pcici_t tag, int unit);
static u_long lkm_count;
struct pci_device lkm_device = {
static struct pci_device lkm_device = {
"lkm",
lkm_probe,
lkm_attach,
@ -540,7 +540,7 @@ static char* ign_probe (pcici_t tag, pcidi_t type);
static void ign_attach (pcici_t tag, int unit);
static u_long ign_count;
struct pci_device ign_device = {
static struct pci_device ign_device = {
NULL,
ign_probe,
ign_attach,

View File

@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
* $Id: cd.c,v 1.51 1995/12/10 19:52:51 bde Exp $
* $Id: cd.c,v 1.52 1995/12/10 20:02:47 bde Exp $
*/
#define SPLCD splbio
@ -80,7 +80,7 @@ static struct cdevsw cd_cdevsw =
&cd_bdevsw, -1 };
int32 cdstrats, cdqueues;
static int32 cdstrats, cdqueues;
#define CDUNIT(DEV) ((minor(DEV)&0xF8) >> 3) /* 5 bit unit */
#define CDSETUNIT(DEV, U) makedev(major(DEV), ((U) << 3))

View File

@ -2,7 +2,7 @@
* Written by grefen@convex.com (probably moved by now)
* Based on scsi drivers by Julian Elischer (julian@tfs.com)
*
* $Id: ch.c,v 1.26 1995/12/08 11:18:40 julian Exp $
* $Id: ch.c,v 1.27 1995/12/08 23:22:19 phk Exp $
*/
#include <sys/types.h>
@ -29,13 +29,13 @@
errval ch_getelem __P((u_int32 unit, short *stat, int type, u_int32 from,
void *data, u_int32 flags));
errval ch_move __P((u_int32 unit, short *stat, u_int32 chm, u_int32 from,
u_int32 to, u_int32 flags));
static errval ch_getelem __P((u_int32 unit, short *stat, int type,
u_int32 from, void *data, u_int32 flags));
static errval ch_move __P((u_int32 unit, short *stat, u_int32 chm,
u_int32 from, u_int32 to, u_int32 flags));
static errval ch_mode_sense __P((u_int32 unit, u_int32 flags));
errval ch_position __P((u_int32 unit, short *stat, u_int32 chm, u_int32 to,
u_int32 flags));
static errval ch_position __P((u_int32 unit, short *stat, u_int32 chm,
u_int32 to, u_int32 flags));
#define CHRETRIES 2
@ -68,11 +68,11 @@ struct scsi_data {
static int chunit(dev_t dev) { return CHUNIT(dev); }
static dev_t chsetunit(dev_t dev, int unit) { return CHSETUNIT(dev, unit); }
errval ch_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link);
errval ch_ioctl(dev_t dev, int cmd, caddr_t addr, int flag,
static errval ch_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link);
static errval ch_ioctl(dev_t dev, int cmd, caddr_t addr, int flag,
struct proc *p, struct scsi_link *sc_link);
errval ch_close(dev_t dev, int flag, int fmt, struct proc *p,
static errval ch_close(dev_t dev, int flag, int fmt, struct proc *p,
struct scsi_link *sc_link);
static d_open_t chopen;
@ -87,7 +87,7 @@ static struct cdevsw ch_cdevsw =
SCSI_DEVICE_ENTRIES(ch)
struct scsi_device ch_switch =
static struct scsi_device ch_switch =
{
NULL,
NULL,
@ -168,7 +168,7 @@ chattach(struct scsi_link *sc_link)
ch_registerdev(unit);
#ifdef DEVFS
sprintf(name,"ch%d",unit);
sprintf(name,"ch%ld",unit);
ch->devfs_token = devfs_add_devsw( "/", name, &ch_cdevsw, unit << 4,
DV_CHR, 0, 0, 0600);
#endif
@ -178,7 +178,7 @@ chattach(struct scsi_link *sc_link)
/*
* open the device.
*/
errval
static errval
ch_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link)
{
@ -227,7 +227,7 @@ struct scsi_link *sc_link)
* close the device.. only called if we are the LAST
* occurence of an open device
*/
errval
static errval
ch_close(dev_t dev, int flag, int fmt, struct proc *p,
struct scsi_link *sc_link)
{
@ -240,7 +240,7 @@ ch_close(dev_t dev, int flag, int fmt, struct proc *p,
* Perform special action on behalf of the user
* Knows about the internals of this device
*/
errval
static errval
ch_ioctl(dev_t dev, int cmd, caddr_t arg, int mode,
struct proc *p, struct scsi_link *sc_link)
{
@ -299,7 +299,7 @@ struct proc *p, struct scsi_link *sc_link)
return (ret ? ESUCCESS : EIO);
}
errval
static errval
ch_getelem(unit, stat, type, from, data, flags)
u_int32 unit, from, flags;
int type;
@ -339,7 +339,7 @@ ch_getelem(unit, stat, type, from, data, flags)
return ret;
}
errval
static errval
ch_move(unit, stat, chm, from, to, flags)
u_int32 unit, chm, from, to, flags;
short *stat;
@ -375,7 +375,7 @@ ch_move(unit, stat, chm, from, to, flags)
return ret;
}
errval
static errval
ch_position(unit, stat, chm, to, flags)
u_int32 unit, chm, to, flags;
short *stat;

View File

@ -28,7 +28,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: od.c,v 1.8 1995/12/10 19:52:55 bde Exp $
* $Id: od.c,v 1.9 1995/12/10 20:19:32 bde Exp $
*/
/*
@ -138,7 +138,7 @@ static struct cdevsw od_cdevsw =
*/
SCSI_DEVICE_ENTRIES(od)
struct scsi_device od_switch =
static struct scsi_device od_switch =
{
od_sense_handler,
odstart, /* have a queue, served by this */
@ -161,8 +161,6 @@ struct scsi_device od_switch =
od_strategy,
};
static struct scsi_xfer sx;
static int
od_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
{
@ -686,6 +684,7 @@ od_size(unit, flags)
return (size);
}
#ifdef notyet
/*
* Tell the device to map out a defective block
*/
@ -718,6 +717,7 @@ od_reassign_blocks(unit, block)
NULL,
SCSI_DATA_OUT));
}
#endif
#define b2tol(a) (((unsigned)(a##_1) << 8) + (unsigned)a##_0 )
/*

View File

@ -37,7 +37,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: pt.c,v 1.9 1995/12/08 11:18:48 julian Exp $
* $Id: pt.c,v 1.10 1995/12/08 23:22:23 phk Exp $
*/
/*
@ -63,9 +63,9 @@ struct scsi_data {
struct buf_queue_head buf_queue;
};
void ptstart(u_int32 unit, u_int32 flags);
void pt_strategy(struct buf *bp, struct scsi_link *sc_link);
int pt_sense(struct scsi_xfer *scsi_xfer);
static void ptstart(u_int32 unit, u_int32 flags);
static void pt_strategy(struct buf *bp, struct scsi_link *sc_link);
static int pt_sense(struct scsi_xfer *scsi_xfer);
static d_open_t ptopen;
static d_close_t ptclose;
@ -81,7 +81,7 @@ static struct cdevsw pt_cdevsw =
SCSI_DEVICE_ENTRIES(pt)
struct scsi_device pt_switch =
static struct scsi_device pt_switch =
{
pt_sense,
ptstart, /* we have a queue, and this is how we service it */
@ -117,7 +117,7 @@ struct scsi_device pt_switch =
* continues to be drained.
* ptstart() is called at splbio
*/
void
static void
ptstart(unit, flags)
u_int32 unit;
u_int32 flags;
@ -190,10 +190,9 @@ ptstart(unit, flags)
} /* go back and see if we can cram more work in.. */
}
void
static void
pt_strategy(struct buf *bp, struct scsi_link *sc_link)
{
struct buf **dp;
unsigned char unit;
u_int32 opri;
struct scsi_data *pt;
@ -236,7 +235,8 @@ pt_strategy(struct buf *bp, struct scsi_link *sc_link)
* For the processor type devices we try to handle the "info" field.
*/
int pt_sense(struct scsi_xfer *xs)
static int
pt_sense(struct scsi_xfer *xs)
{
struct scsi_sense_data *sense = &(xs->sense);
struct buf *bp;

View File

@ -8,7 +8,7 @@
* file.
*
* Written by Julian Elischer (julian@dialix.oz.au)
* $Id: scsi_base.c,v 1.31 1995/10/09 15:14:58 joerg Exp $
* $Id: scsi_base.c,v 1.32 1995/12/07 12:47:46 davidg Exp $
*/
#define SPLSD splbio
@ -31,8 +31,18 @@
static errval sc_err1(struct scsi_xfer *);
static errval scsi_interpret_sense(struct scsi_xfer *);
static struct scsi_xfer *get_xs( struct scsi_link *sc_link, u_int32 flags);
static void free_xs(struct scsi_xfer *xs, struct scsi_link *sc_link,
u_int32 flags);
static void show_mem(unsigned char *address, u_int32 num);
static void show_scsi_xs (struct scsi_xfer *);
struct scsi_xfer *next_free_xs;
#ifdef notyet
static int scsi_sense_qualifiers (struct scsi_xfer *, int *, int *);
static errval scsi_change_def( struct scsi_link *sc_link, u_int32 flags);
#endif
static struct scsi_xfer *next_free_xs;
/*
* Get a scsi transfer structure for the caller. Charge the structure
@ -45,7 +55,7 @@ struct scsi_xfer *next_free_xs;
* Note in the link structure, that we are waiting on it.
*/
struct scsi_xfer *
static struct scsi_xfer *
get_xs(sc_link, flags)
struct scsi_link *sc_link; /* who to charge the xs to */
u_int32 flags; /* if this call can sleep */
@ -90,7 +100,7 @@ get_xs(sc_link, flags)
* return the struct to the free pool and credit the device with it
* If another process is waiting for an xs, do a wakeup, let it proceed
*/
void
static void
free_xs(xs, sc_link, flags)
struct scsi_xfer *xs;
struct scsi_link *sc_link; /* who to credit for returning it */
@ -221,10 +231,11 @@ scsi_test_unit_ready(sc_link, flags)
flags));
}
#ifdef notyet
/*
* Do a scsi operation, asking a device to run as SCSI-II if it can.
*/
errval
static errval
scsi_change_def(sc_link, flags)
struct scsi_link *sc_link;
u_int32 flags;
@ -245,6 +256,7 @@ scsi_change_def(sc_link, flags)
NULL,
flags));
}
#endif
/*
* Do a scsi operation asking a device what it is
@ -752,7 +764,8 @@ sc_err1(xs)
}
}
int
#ifdef notyet
static int
scsi_sense_qualifiers(xs, asc, ascq)
struct scsi_xfer *xs;
int *asc;
@ -774,6 +787,8 @@ scsi_sense_qualifiers(xs, asc, ascq)
return 1;
}
#endif
/*
* scsi_sense_print will decode the sense data into human
* readable form. Sense handlers can use this to generate
@ -1236,7 +1251,7 @@ sc_print_addr(sc_link)
/*
* Given a scsi_xfer, dump the request, in all it's glory
*/
void
static void
show_scsi_xs(xs)
struct scsi_xfer *xs;
{
@ -1278,7 +1293,7 @@ show_scsi_cmd(struct scsi_xfer *xs)
}
}
void
static void
show_mem(address, num)
unsigned char *address;
u_int32 num;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*End copyright
*
* $Id: scsi_ioctl.c,v 1.16 1995/05/30 08:13:42 rgrimes Exp $
* $Id: scsi_ioctl.c,v 1.17 1995/11/10 14:54:16 davidg Exp $
*
*
*/
@ -58,7 +58,7 @@
#include <scsi/scsiconf.h>
#include <sys/scsiio.h>
void scsierr(struct buf *, int); /* XXX ??? */
static void scsierr(struct buf *, int); /* XXX ??? */
/*
* We let the user interpret his own sense in the generic scsi world.
@ -147,7 +147,8 @@ struct scsi_xfer *xs;
* from the cdevsw/bdevsw tables because they couldn't have added
* the screq structure. [JRE]
*/
void scsistrategy(struct buf *bp)
static void
scsistrategy(struct buf *bp)
{
errval err;
struct scsi_link *sc_link = bp->b_sc_link;
@ -239,12 +240,6 @@ void scsistrategy(struct buf *bp)
return;
}
void scsiminphys(struct buf *bp)
{
/*XXX*//* call the adapter's minphys */
}
/*
* Something (e.g. another driver) has called us
* with an sc_link for a target/lun/adapter, and a scsi

View File

@ -16,7 +16,7 @@
*
* New configuration setup: dufault@hda.com
*
* $Id: scsiconf.c,v 1.40 1995/12/13 15:13:37 julian Exp $
* $Id: scsiconf.c,v 1.41 1995/12/13 20:08:53 peter Exp $
*/
#include <sys/types.h>
@ -46,9 +46,9 @@
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
extern struct extend_array *extend_new __P((void));
extern void extend_release __P((struct extend_array *ea, int index));
extern void *extend_set __P((struct extend_array *ea, int index, void *value));
static struct extend_array *extend_new __P((void));
static void extend_release __P((struct extend_array *ea, int index));
static void *extend_set __P((struct extend_array *ea, int index, void *value));
/*
* XXX SCSI_DEVICE_ENTRIES() generates extern switches but it should
@ -90,7 +90,7 @@ extend_free(void *p) { free(p, M_DEVBUF); }
#define EXTEND_CHUNK 8
#endif
struct extend_array *
static struct extend_array *
extend_new(void)
{
struct extend_array *p = extend_alloc(sizeof(*p));
@ -102,7 +102,7 @@ extend_new(void)
return p;
}
void *
static void *
extend_set(struct extend_array *ea, int index, void *value)
{
if (index >= ea->nelem) {
@ -137,7 +137,7 @@ extend_get(struct extend_array *ea, int index)
return ea->ps[index];
}
void
static void
extend_release(struct extend_array *ea, int index)
{
void *p = extend_get(ea, index);
@ -156,7 +156,7 @@ extend_release(struct extend_array *ea, int index)
* the others, before they have the rest of the fields filled in
*/
struct extend_array *scbusses;
static struct extend_array *scbusses;
/*
* The structure of known drivers for autoconfiguration
@ -315,9 +315,9 @@ static struct scsidevs knowndevs[] =
/*
* Declarations
*/
struct scsidevs *scsi_probedev __P((struct scsi_link *sc_link,
static struct scsidevs *scsi_probedev __P((struct scsi_link *sc_link,
boolean *maybe_more, int *type_p));
struct scsidevs *scsi_selectdev __P((u_int32 qualifier, u_int32 type,
static struct scsidevs *scsi_selectdev __P((u_int32 qualifier, u_int32 type,
boolean remov, char *manu, char *model,
char *rev));
@ -325,7 +325,7 @@ struct scsidevs *scsi_selectdev __P((u_int32 qualifier, u_int32 type,
* This scsi_device doesn't have the scsi_data_size.
* This is used during probe.
*/
struct scsi_device probe_switch =
static struct scsi_device probe_switch =
{
NULL,
NULL,
@ -1020,7 +1020,7 @@ make_readable(to, from, n)
* it is, and find the correct driver table
* entry.
*/
struct scsidevs *
static struct scsidevs *
scsi_probedev(sc_link, maybe_more, type_p)
boolean *maybe_more;
struct scsi_link *sc_link;
@ -1212,7 +1212,7 @@ scsi_dev_lookup(d_open)
* Short pattern matches trailing blanks in name,
* wildcard '*' in pattern matches rest of name
*/
int
static int
match(pattern, name)
char *pattern;
char *name;
@ -1235,7 +1235,7 @@ match(pattern, name)
* Try make as good a match as possible with
* available sub drivers
*/
struct scsidevs *
static struct scsidevs *
scsi_selectdev(qualifier, type, remov, manu, model, rev)
u_int32 qualifier, type;
boolean remov;

View File

@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
* $Id: scsiconf.h,v 1.32 1995/12/05 07:14:25 julian Exp $
* $Id: scsiconf.h,v 1.33 1995/12/10 10:58:27 julian Exp $
*/
#ifndef SCSI_SCSICONF_H
#define SCSI_SCSICONF_H 1
@ -421,14 +421,11 @@ struct scsi_xfer
#ifdef KERNEL
void *extend_get(struct extend_array *ea, int index);
void scsi_attachdevs __P((struct scsibus_data *scbus));
struct scsi_xfer *get_xs( struct scsi_link *sc_link, u_int32 flags);
void free_xs(struct scsi_xfer *xs, struct scsi_link *sc_link,u_int32 flags);
u_int32 scsi_read_capacity __P(( struct scsi_link *sc_link,
u_int32 *blk_size, u_int32 flags));
errval scsi_test_unit_ready __P(( struct scsi_link *sc_link, u_int32 flags));
errval scsi_reset_target __P((struct scsi_link *));
errval scsi_target_mode __P((struct scsi_link *, int));
errval scsi_change_def( struct scsi_link *sc_link, u_int32 flags);
errval scsi_inquire( struct scsi_link *sc_link,
struct scsi_inquiry_data *inqbuf, u_int32 flags);
errval scsi_prevent( struct scsi_link *sc_link, u_int32 type,u_int32 flags);
@ -456,10 +453,7 @@ errval scsi_set_bus __P((int, struct scsi_link *));
char *scsi_sense_desc __P((int, int));
void scsi_sense_print __P((struct scsi_xfer *));
int scsi_sense_qualifiers __P((struct scsi_xfer *, int *, int *));
void show_scsi_xs __P((struct scsi_xfer *));
void show_scsi_cmd __P((struct scsi_xfer *));
void show_mem __P((unsigned char * , u_int32));
void scsi_uto3b __P((u_int32 , u_char *));
u_int32 scsi_3btou __P((u_char *));

View File

@ -37,7 +37,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: sctarg.c,v 1.9 1995/12/08 11:18:51 julian Exp $
* $Id: sctarg.c,v 1.10 1995/12/08 23:22:24 phk Exp $
*/
/*
@ -66,12 +66,10 @@ struct scsi_data {
int flags; /* Already open */
};
errval sctarg_open(dev_t dev, int flags, int fmt, struct proc *p,
static errval sctarg_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link);
void sctargstart(u_int32 unit, u_int32 unused_flags);
errval sctarg_close(dev_t dev, int flag, int fmt, struct proc *p,
struct scsi_link *sc_link);
void sctarg_strategy(struct buf *bp, struct scsi_link *sc_link);
static void sctargstart(u_int32 unit, u_int32 unused_flags);
static void sctarg_strategy(struct buf *bp, struct scsi_link *sc_link);
static d_open_t sctargopen;
static d_close_t sctargclose;
@ -86,7 +84,7 @@ static struct cdevsw sctarg_cdevsw =
SCSI_DEVICE_ENTRIES(sctarg)
struct scsi_device sctarg_switch =
static struct scsi_device sctarg_switch =
{
NULL,
sctargstart, /* we have a queue, and this is how we service it */
@ -109,7 +107,8 @@ struct scsi_device sctarg_switch =
sctarg_strategy,
};
errval sctarg_open(dev_t dev, int flags, int fmt, struct proc *p,
static errval
sctarg_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link)
{
int ret = 0;
@ -144,21 +143,6 @@ struct scsi_link *sc_link)
return ret;
}
errval sctarg_close(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link)
{
int ret = 0;
/* XXX: You can have more than one target device on a single
* host adapter. We need a reference count.
*/
ret = scsi_target_mode(sc_link, 0);
sc_link->sd->flags &= ~OPEN;
return ret;
}
/*
* sctargstart looks to see if there is a buf waiting for the device
* and that the device is not already busy. If both are true,
@ -173,7 +157,7 @@ struct scsi_link *sc_link)
* continues to be drained.
* sctargstart() is called at splbio
*/
void
static void
sctargstart(unit, unused_flags)
u_int32 unit;
u_int32 unused_flags;
@ -247,10 +231,9 @@ sctargstart(unit, unused_flags)
} /* go back and see if we can cram more work in.. */
}
void
static void
sctarg_strategy(struct buf *bp, struct scsi_link *sc_link)
{
struct buf **dp;
unsigned char unit;
u_int32 opri;
struct scsi_data *sctarg;

View File

@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: st.c,v 1.53 1995/12/10 10:58:30 julian Exp $
* $Id: st.c,v 1.54 1995/12/10 19:52:59 bde Exp $
*/
/*
@ -167,10 +167,10 @@ static errval st_close(dev_t dev, int flag, int fmt, struct proc *p,
struct scsi_link *sc_link);
static void st_strategy(struct buf *bp, struct scsi_link *sc_link);
d_open_t stopen;
d_close_t stclose;
d_ioctl_t stioctl;
d_strategy_t ststrategy;
static d_open_t stopen;
static d_close_t stclose;
static d_ioctl_t stioctl;
static d_strategy_t ststrategy;
#define CDEV_MAJOR 14
#define BDEV_MAJOR 5
@ -314,76 +314,76 @@ stattach(struct scsi_link *sc_link)
#ifdef DEVFS
#define ST_GID 13
#define ST_UID 0
sprintf(name,"rst%d.0",unit);
sprintf(name,"rst%ld.0",unit);
st->devfs_token.rst_0 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 0,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"nrst%d.0",unit);
sprintf(name,"nrst%ld.0",unit);
st->devfs_token.nrst_0 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 1,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"enrst%d.0",unit);
sprintf(name,"enrst%ld.0",unit);
st->devfs_token.enrst_0 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 2,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"st%dctl.0",unit);
sprintf(name,"st%ldctl.0",unit);
st->devfs_token.ctl_0 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 3,
DV_CHR, ST_UID, ST_GID, 0600 );
sprintf(name,"rst%d.1",unit);
sprintf(name,"rst%ld.1",unit);
st->devfs_token.rst_1 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 4,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"nrst%d.1",unit);
sprintf(name,"nrst%ld.1",unit);
st->devfs_token.nrst_1 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 5,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"enrst%d.1",unit);
sprintf(name,"enrst%ld.1",unit);
st->devfs_token.enrst_1 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 6,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"st%dctl.1",unit);
sprintf(name,"st%ldctl.1",unit);
st->devfs_token.ctl_1 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 7,
DV_CHR, ST_UID, ST_GID, 0600 );
sprintf(name,"rst%d.2",unit);
sprintf(name,"rst%ld.2",unit);
st->devfs_token.rst_2 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 8,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"nrst%d.2",unit);
sprintf(name,"nrst%ld.2",unit);
st->devfs_token.nrst_2 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 9,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"enrst%d.2",unit);
sprintf(name,"enrst%ld.2",unit);
st->devfs_token.enrst_2 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 10,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"st%dctl.2",unit);
sprintf(name,"st%ldctl.2",unit);
st->devfs_token.ctl_2 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 11,
DV_CHR, ST_UID, ST_GID, 0600 );
sprintf(name,"rst%d.3",unit);
sprintf(name,"rst%ld.3",unit);
st->devfs_token.rst_3 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 12,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"nrst%d.3",unit);
sprintf(name,"nrst%ld.3",unit);
st->devfs_token.nrst_3 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 13,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"enrst%d.3",unit);
sprintf(name,"enrst%ld.3",unit);
st->devfs_token.enrst_3 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 14,
DV_CHR, ST_UID, ST_GID, 0660 );
sprintf(name,"st%dctl.3",unit);
sprintf(name,"st%ldctl.3",unit);
st->devfs_token.ctl_3 = devfs_add_devsw( "/tape", name,
&st_cdevsw, (unit << 4 ) + 15,
DV_CHR, ST_UID, ST_GID, 0600 );
/** add links **/
sprintf(name,"rst%d",unit);
sprintf(name,"rst%ld",unit);
st->devfs_token.rst = dev_link( "/", name, st->devfs_token.rst_0);
sprintf(name,"nrst%d",unit);
sprintf(name,"nrst%ld",unit);
st->devfs_token.nrst = dev_link( "/", name, st->devfs_token.nrst_0);
sprintf(name,"enrst%d",unit);
sprintf(name,"enrst%ld",unit);
st->devfs_token.enrst = dev_link( "/", name, st->devfs_token.enrst_0);
#endif
return 0;

View File

@ -37,7 +37,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: worm.c,v 1.14 1995/12/08 11:19:07 julian Exp $
* $Id: worm.c,v 1.15 1995/12/08 23:22:33 phk Exp $
*/
/* XXX This is PRELIMINARY.
@ -87,7 +87,7 @@ static void worm_strategy(struct buf *bp, struct scsi_link *sc_link);
static d_open_t wormopen;
static d_close_t wormclose;
static d_ioctl_t wormioctl;
d_strategy_t wormstrategy;
static d_strategy_t wormstrategy;
#define CDEV_MAJOR 62
static struct cdevsw worm_cdevsw =
@ -273,7 +273,6 @@ badnews:
static void
worm_strategy(struct buf *bp, struct scsi_link *sc_link)
{
struct buf **dp;
unsigned char unit;
u_int32 opri;
struct scsi_data *worm;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)un.h 8.1 (Berkeley) 6/2/93
* $Id: un.h,v 1.6 1995/05/30 08:14:48 rgrimes Exp $
* $Id: un.h,v 1.7 1995/11/21 12:55:15 bde Exp $
*/
#ifndef _SYS_UN_H_
@ -54,20 +54,8 @@ struct sockaddr_un {
int uipc_usrreq __P((struct socket *, int, struct mbuf *, struct mbuf *,
struct mbuf *));
int unp_connect2 __P((struct socket*,struct socket*));
void unp_detach __P((struct unpcb *));
void unp_disconnect __P((struct unpcb *));
void unp_shutdown __P((struct unpcb *));
void unp_drop __P((struct unpcb *, int));
void unp_gc __P((void));
void unp_dispose __P((struct mbuf *));
void unp_scan __P((struct mbuf *, void (*)(struct file *)));
void unp_mark __P((struct file *));
void unp_discard __P((struct file *));
int unp_attach __P((struct socket *));
int unp_bind __P((struct unpcb *,struct mbuf *, struct proc *));
int unp_connect __P((struct socket *,struct mbuf *, struct proc *));
int unp_externalize __P((struct mbuf *));
int unp_internalize __P((struct mbuf *, struct proc *));
#else /* KERNEL */
/* actual length of an initialized sockaddr_un */
#define SUN_LEN(su) \

View File

@ -32,7 +32,7 @@
# SUCH DAMAGE.
#
# @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93
# $Id: vnode_if.sh,v 1.7 1995/10/29 15:31:27 phk Exp $
# $Id: vnode_if.sh,v 1.8 1995/12/06 23:33:39 bde Exp $
#
# Script to produce VFS front-end sugar.
@ -400,7 +400,7 @@ static inline int VOP_BWRITE(bp)
END_OF_SPECIAL_CASES
cat << END_OF_SPECIAL_CASES >> $CFILE
int vop_strategy_vp_offsets[] = {
static int vop_strategy_vp_offsets[] = {
VDESC_NO_OFFSET
};
struct vnodeop_desc vop_strategy_desc = {
@ -414,7 +414,7 @@ struct vnodeop_desc vop_strategy_desc = {
VDESC_NO_OFFSET,
NULL,
};
int vop_bwrite_vp_offsets[] = {
static int vop_bwrite_vp_offsets[] = {
VDESC_NO_OFFSET
};
struct vnodeop_desc vop_bwrite_desc = {

View File

@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: default_pager.c,v 1.3 1995/12/07 12:48:00 davidg Exp $
* $Id: default_pager.c,v 1.4 1995/12/11 04:57:56 dyson Exp $
*/
#include <sys/param.h>
@ -46,6 +46,14 @@
#include <vm/default_pager.h>
#include <vm/swap_pager.h>
static vm_object_t default_pager_alloc __P((void *, vm_size_t, vm_prot_t,
vm_ooffset_t));
static void default_pager_dealloc __P((vm_object_t));
static int default_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
static int default_pager_putpages __P((vm_object_t, vm_page_t *, int,
boolean_t, int *));
static boolean_t default_pager_haspage __P((vm_object_t, vm_pindex_t, int *,
int *));
/*
* pagerops for OBJT_DEFAULT - "default pager".
*/
@ -62,7 +70,7 @@ struct pagerops defaultpagerops = {
/*
* no_pager_alloc just returns an initialized object.
*/
vm_object_t
static vm_object_t
default_pager_alloc(handle, size, prot, offset)
void *handle;
register vm_size_t size;
@ -75,7 +83,7 @@ default_pager_alloc(handle, size, prot, offset)
return vm_object_allocate(OBJT_DEFAULT, offset + size);
}
void
static void
default_pager_dealloc(object)
vm_object_t object;
{
@ -88,7 +96,7 @@ default_pager_dealloc(object)
* The default pager has no backing store, so we always return
* failure.
*/
int
static int
default_pager_getpages(object, m, count, reqpage)
vm_object_t object;
vm_page_t *m;
@ -98,7 +106,7 @@ default_pager_getpages(object, m, count, reqpage)
return VM_PAGER_FAIL;
}
int
static int
default_pager_putpages(object, m, c, sync, rtvals)
vm_object_t object;
vm_page_t *m;
@ -126,7 +134,7 @@ default_pager_putpages(object, m, c, sync, rtvals)
return swap_pager_putpages(object, m, c, sync, rtvals);
}
boolean_t
static boolean_t
default_pager_haspage(object, pindex, before, after)
vm_object_t object;
vm_pindex_t pindex;

View File

@ -28,16 +28,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: default_pager.h,v 1.1 1995/07/13 10:15:03 davidg Exp $
* $Id: default_pager.h,v 1.2 1995/12/11 04:57:58 dyson Exp $
*/
#ifndef _DEFAULT_PAGER_H_
#define _DEFAULT_PAGER_H_ 1
vm_object_t default_pager_alloc __P((void *, vm_size_t, vm_prot_t, vm_ooffset_t));
void default_pager_dealloc __P((vm_object_t));
int default_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
int default_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
boolean_t default_pager_haspage __P((vm_object_t, vm_pindex_t, int *, int *));
#endif /* _DEFAULT_PAGER_H_ */

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)device_pager.c 8.1 (Berkeley) 6/11/93
* $Id: device_pager.c,v 1.17 1995/12/11 04:57:59 dyson Exp $
* $Id: device_pager.c,v 1.18 1995/12/13 15:13:54 julian Exp $
*/
#include <sys/param.h>
@ -56,8 +56,21 @@
#include <vm/vm_pager.h>
#include <vm/device_pager.h>
struct pagerlst dev_pager_object_list; /* list of device pager objects */
TAILQ_HEAD(, vm_page) dev_pager_fakelist; /* list of available vm_page_t's */
static void dev_pager_init __P((void));
static vm_object_t dev_pager_alloc __P((void *, vm_size_t, vm_prot_t,
vm_ooffset_t));
static void dev_pager_dealloc __P((vm_object_t));
static int dev_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
static int dev_pager_putpages __P((vm_object_t, vm_page_t *, int,
boolean_t, int *));
static boolean_t dev_pager_haspage __P((vm_object_t, vm_pindex_t, int *,
int *));
/* list of device pager objects */
static struct pagerlst dev_pager_object_list;
/* list of available vm_page_t's */
static TAILQ_HEAD(, vm_page) dev_pager_fakelist;
static vm_page_t dev_pager_getfake __P((vm_offset_t));
static void dev_pager_putfake __P((vm_page_t));
@ -74,14 +87,14 @@ struct pagerops devicepagerops = {
NULL
};
void
static void
dev_pager_init()
{
TAILQ_INIT(&dev_pager_object_list);
TAILQ_INIT(&dev_pager_fakelist);
}
vm_object_t
static vm_object_t
dev_pager_alloc(handle, size, prot, foff)
void *handle;
vm_size_t size;
@ -159,7 +172,7 @@ dev_pager_alloc(handle, size, prot, foff)
return (object);
}
void
static void
dev_pager_dealloc(object)
vm_object_t object;
{
@ -175,7 +188,7 @@ dev_pager_dealloc(object)
}
}
int
static int
dev_pager_getpages(object, m, count, reqpage)
vm_object_t object;
vm_page_t *m;
@ -220,7 +233,7 @@ dev_pager_getpages(object, m, count, reqpage)
return (VM_PAGER_OK);
}
int
static int
dev_pager_putpages(object, m, count, sync, rtvals)
vm_object_t object;
vm_page_t *m;
@ -231,7 +244,7 @@ dev_pager_putpages(object, m, count, sync, rtvals)
panic("dev_pager_putpage called");
}
boolean_t
static boolean_t
dev_pager_haspage(object, pindex, before, after)
vm_object_t object;
vm_pindex_t pindex;

View File

@ -36,17 +36,11 @@
* SUCH DAMAGE.
*
* @(#)device_pager.h 8.3 (Berkeley) 12/13/93
* $Id: device_pager.h,v 1.4 1995/07/13 08:48:11 davidg Exp $
* $Id: device_pager.h,v 1.5 1995/12/11 04:58:00 dyson Exp $
*/
#ifndef _DEVICE_PAGER_
#define _DEVICE_PAGER_ 1
void dev_pager_init __P((void));
vm_object_t dev_pager_alloc __P((void *, vm_size_t, vm_prot_t, vm_ooffset_t));
void dev_pager_dealloc __P((vm_object_t));
int dev_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
int dev_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
boolean_t dev_pager_haspage __P((vm_object_t, vm_pindex_t, int *, int *));
#endif /* _DEVICE_PAGER_ */

View File

@ -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.55 1995/12/11 15:43:33 dyson Exp $
* $Id: swap_pager.c,v 1.56 1995/12/14 08:32:45 phk Exp $
*/
/*
@ -76,12 +76,11 @@
#define NPENDINGIO 10
#endif
int nswiodone;
static int nswiodone;
int swap_pager_full;
extern int vm_swap_size;
static int no_swap_space = 1;
struct rlist *swaplist;
int nswaplist;
#define MAX_PAGEOUT_CLUSTER 16
@ -89,7 +88,7 @@ TAILQ_HEAD(swpclean, swpagerclean);
typedef struct swpagerclean *swp_clean_t;
struct swpagerclean {
static struct swpagerclean {
TAILQ_ENTRY(swpagerclean) spc_list;
int spc_flags;
struct buf *spc_bp;
@ -105,15 +104,24 @@ struct swpagerclean {
#define SWB_EMPTY (-1)
struct swpclean swap_pager_done; /* list of completed page cleans */
struct swpclean swap_pager_inuse; /* list of pending page cleans */
struct swpclean swap_pager_free; /* list of free pager clean structs */
struct pagerlst swap_pager_object_list; /* list of "named" anon region objects */
struct pagerlst swap_pager_un_object_list; /* list of "unnamed" anon region objects */
/* list of completed page cleans */
static struct swpclean swap_pager_done;
/* list of pending page cleans */
static struct swpclean swap_pager_inuse;
/* list of free pager clean structs */
static struct swpclean swap_pager_free;
/* list of "named" anon region objects */
static struct pagerlst swap_pager_object_list;
/* list of "unnamed" anon region objects */
struct pagerlst swap_pager_un_object_list;
#define SWAP_FREE_NEEDED 0x1 /* need a swap block */
#define SWAP_FREE_NEEDED_BY_PAGEOUT 0x2
int swap_pager_needflags;
static int swap_pager_needflags;
static struct pagerlst *swp_qs[] = {
&swap_pager_object_list, &swap_pager_un_object_list, (struct pagerlst *) 0
@ -129,7 +137,10 @@ static void swap_pager_dealloc __P((vm_object_t object));
static boolean_t
swap_pager_haspage __P((vm_object_t object, vm_pindex_t pindex,
int *before, int *after));
static int swap_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
static void swap_pager_init __P((void));
static void swap_pager_sync __P((void));
struct pagerops swappagerops = {
swap_pager_init,
swap_pager_alloc,
@ -141,7 +152,8 @@ struct pagerops swappagerops = {
};
static int npendingio = NPENDINGIO;
int dmmin, dmmax;
static int dmmin;
int dmmax;
static __pure int
swap_pager_block_index __P((vm_offset_t offset)) __pure2;
@ -832,7 +844,7 @@ swap_pager_iodone1(bp)
wakeup(bp);
}
int
static int
swap_pager_getpages(object, m, count, reqpage)
vm_object_t object;
vm_page_t *m;
@ -1451,7 +1463,7 @@ swap_pager_putpages(object, m, count, sync, rtvals)
return (rv);
}
void
static void
swap_pager_sync()
{
register swp_clean_t spc, tspc;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)swap_pager.h 7.1 (Berkeley) 12/5/90
* $Id: swap_pager.h,v 1.11 1995/11/16 09:51:22 bde Exp $
* $Id: swap_pager.h,v 1.12 1995/12/11 04:58:03 dyson Exp $
*/
/*
@ -67,9 +67,7 @@ typedef struct swblock *sw_blk_t;
extern struct pagerlst swap_pager_un_object_list;
extern int swap_pager_full;
int swap_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
int swap_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
void swap_pager_sync __P((void));
int swap_pager_swp_alloc __P((vm_object_t, int));
void swap_pager_copy __P((vm_object_t, vm_pindex_t, vm_object_t,
vm_pindex_t, vm_pindex_t));

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)vm_extern.h 8.2 (Berkeley) 1/12/94
* $Id: vm_extern.h,v 1.20 1995/12/07 12:48:08 davidg Exp $
* $Id: vm_extern.h,v 1.21 1995/12/11 04:58:04 dyson Exp $
*/
#ifndef _VM_EXTERN_H_
@ -82,9 +82,7 @@ vm_map_t kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, b
void munmapfd __P((struct proc *, int));
int pager_cache __P((vm_object_t, boolean_t));
int swaponvp __P((struct proc *, struct vnode *, dev_t , u_long));
void swapout __P((struct proc *));
void swapout_procs __P((void));
void swstrategy __P((struct buf *));
int useracc __P((caddr_t, int, int));
int vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, boolean_t));
void vm_fault_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t));

View File

@ -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.31 1995/12/02 17:11:18 bde Exp $
* $Id: vm_glue.c,v 1.32 1995/12/07 12:48:11 davidg Exp $
*/
#include <sys/param.h>
@ -108,6 +108,8 @@ static void scheduler __P((void *));
SYSINIT(scheduler, SI_SUB_RUN_SCHEDULER, SI_ORDER_FIRST, scheduler, NULL)
static void swapout __P((struct proc *));
extern char kstack[];
/* vm_map_t upages_map; */
@ -505,7 +507,7 @@ retry:
wakeup(&proc0);
}
void
static void
swapout(p)
register struct proc *p;
{

View File

@ -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.28 1995/12/07 12:48:15 davidg Exp $
* $Id: vm_map.c,v 1.29 1995/12/11 04:58:12 dyson Exp $
*/
/*
@ -148,15 +148,24 @@
vm_offset_t kentry_data;
vm_size_t kentry_data_size;
vm_map_entry_t kentry_free;
vm_map_t kmap_free;
static vm_map_entry_t kentry_free;
static vm_map_t kmap_free;
int kentry_count;
static int kentry_count;
static vm_offset_t mapvm_start, mapvm, mapvmmax;
static int mapvmpgcnt;
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));
static vm_map_entry_t vm_map_entry_create __P((vm_map_t));
static void vm_map_entry_delete __P((vm_map_t, vm_map_entry_t));
static void vm_map_entry_dispose __P((vm_map_t, vm_map_entry_t));
static void vm_map_entry_unwire __P((vm_map_t, vm_map_entry_t));
static void vm_map_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t,
vm_map_entry_t));
#ifdef notyet
static void vm_map_simplify_entry __P((vm_map_t, vm_map_entry_t));
#endif
void
vm_map_startup()
@ -311,7 +320,7 @@ vm_map_init(map, min, max, pageable)
static struct vm_map_entry *mappool;
static int mappoolcnt;
vm_map_entry_t
static vm_map_entry_t
vm_map_entry_create(map)
vm_map_t map;
{
@ -388,7 +397,7 @@ vm_map_entry_create(map)
*
* Inverse of vm_map_entry_create.
*/
void
static void
vm_map_entry_dispose(map, entry)
vm_map_t map;
vm_map_entry_t entry;
@ -795,6 +804,7 @@ vm_map_find(map, object, offset, addr, length, find_space)
return (result);
}
#ifdef notyet
/*
* vm_map_simplify_entry: [ internal use only ]
*
@ -802,7 +812,7 @@ vm_map_find(map, object, offset, addr, length, find_space)
* removing extra sharing maps
* [XXX maybe later] merging with a neighbor
*/
void
static void
vm_map_simplify_entry(map, entry)
vm_map_t map;
vm_map_entry_t entry;
@ -853,6 +863,7 @@ vm_map_simplify_entry(map, entry)
*/
}
}
#endif
/*
* vm_map_clip_start: [ internal use only ]
@ -1524,7 +1535,7 @@ vm_map_clean(map, start, end, syncio, invalidate)
* The map in question should be locked.
* [This is the reason for this routine's existence.]
*/
void
static void
vm_map_entry_unwire(map, entry)
vm_map_t map;
register vm_map_entry_t entry;
@ -1538,7 +1549,7 @@ vm_map_entry_unwire(map, entry)
*
* Deallocate the given entry from the target map.
*/
void
static void
vm_map_entry_delete(map, entry)
register vm_map_t map;
register vm_map_entry_t entry;
@ -1735,7 +1746,7 @@ vm_map_check_protection(map, start, end, protection)
* Copies the contents of the source entry to the destination
* entry. The entries *must* be aligned properly.
*/
void
static void
vm_map_copy_entry(src_map, dst_map, src_entry, dst_entry)
vm_map_t src_map, dst_map;
register vm_map_entry_t src_entry, dst_entry;

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_map.h,v 1.8 1995/12/07 12:48:17 davidg Exp $
* $Id: vm_map.h,v 1.9 1995/12/11 04:58:14 dyson Exp $
*/
/*
@ -208,15 +208,10 @@ extern vm_size_t kentry_data_size;
boolean_t vm_map_check_protection __P((vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t));
int vm_map_copy __P((vm_map_t, vm_map_t, vm_offset_t, vm_size_t, vm_offset_t, boolean_t, boolean_t));
void vm_map_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t));
struct pmap;
vm_map_t vm_map_create __P((struct pmap *, vm_offset_t, vm_offset_t, boolean_t));
void vm_map_deallocate __P((vm_map_t));
int vm_map_delete __P((vm_map_t, vm_offset_t, vm_offset_t));
vm_map_entry_t vm_map_entry_create __P((vm_map_t));
void vm_map_entry_delete __P((vm_map_t, vm_map_entry_t));
void vm_map_entry_dispose __P((vm_map_t, vm_map_entry_t));
void vm_map_entry_unwire __P((vm_map_t, vm_map_entry_t));
int vm_map_find __P((vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, boolean_t));
int vm_map_findspace __P((vm_map_t, vm_offset_t, vm_size_t, vm_offset_t *));
int vm_map_inherit __P((vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t));
@ -232,7 +227,6 @@ int vm_map_protect __P((vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t
void vm_map_reference __P((vm_map_t));
int vm_map_remove __P((vm_map_t, vm_offset_t, vm_offset_t));
void vm_map_simplify __P((vm_map_t, vm_offset_t));
void vm_map_simplify_entry __P((vm_map_t, vm_map_entry_t));
void vm_map_startup __P((void));
int vm_map_submap __P((vm_map_t, vm_offset_t, vm_offset_t, vm_map_t));

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)vm_meter.c 8.4 (Berkeley) 1/4/94
* $Id: vm_meter.c,v 1.11 1995/12/07 12:48:18 davidg Exp $
* $Id: vm_meter.c,v 1.12 1995/12/10 14:52:10 bde Exp $
*/
#include <sys/param.h>
@ -56,13 +56,13 @@ struct loadavg averunnable =
struct vmmeter cnt;
int maxslp = MAXSLP;
static int maxslp = MAXSLP;
/*
* Constants for averages over 1, 5, and 15 minutes
* when sampling at 5 second intervals.
*/
fixpt_t cexp[3] = {
static fixpt_t cexp[3] = {
0.9200444146293232 * FSCALE, /* exp(-1/12) */
0.9834714538216174 * FSCALE, /* exp(-1/60) */
0.9944598480048967 * FSCALE, /* exp(-1/180) */

View File

@ -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.58 1995/12/07 12:48:21 davidg Exp $
* $Id: vm_object.c,v 1.59 1995/12/11 04:58:20 dyson Exp $
*/
/*
@ -92,7 +92,7 @@
#include <vm/vm_extern.h>
#ifdef DDB
extern void vm_object_check __P((void));
static void DDB_vm_object_check __P((void));
#endif
static void _vm_object_allocate __P((objtype_t, vm_size_t, vm_object_t));
@ -101,10 +101,12 @@ static int _vm_object_in_map __P((vm_map_t map, vm_object_t object,
vm_map_entry_t entry));
static int vm_object_in_map __P((vm_object_t object));
#endif
static vm_page_t
vm_object_page_lookup __P((vm_object_t object,
vm_offset_t offset));
static void vm_object_qcollapse __P((vm_object_t object));
#ifdef not_used
static void vm_object_deactivate_pages __P((vm_object_t));
#endif
static void vm_object_terminate __P((vm_object_t));
static void vm_object_cache_trim __P((void));
/*
* Virtual memory objects maintain the actual data
@ -134,17 +136,17 @@ static void vm_object_qcollapse __P((vm_object_t object));
int vm_object_cache_max;
struct object_q vm_object_cached_list;
int vm_object_cached;
static int vm_object_cached;
struct object_q vm_object_list;
long vm_object_count;
static long vm_object_count;
vm_object_t kernel_object;
vm_object_t kmem_object;
struct vm_object kernel_object_store;
struct vm_object kmem_object_store;
static struct vm_object kernel_object_store;
static struct vm_object kmem_object_store;
extern int vm_pageout_page_count;
long object_collapses;
long object_bypasses;
static long object_collapses;
static long object_bypasses;
static void
_vm_object_allocate(type, size, object)
@ -359,7 +361,7 @@ vm_object_deallocate(object)
*
* The object must be locked.
*/
void
static void
vm_object_terminate(object)
register vm_object_t object;
{
@ -531,6 +533,8 @@ relookup:
return;
}
#ifdef not_used
/* XXX I cannot tell if this should be an exported symbol */
/*
* vm_object_deactivate_pages
*
@ -539,7 +543,7 @@ relookup:
*
* The object must be locked.
*/
void
static void
vm_object_deactivate_pages(object)
register vm_object_t object;
{
@ -550,11 +554,12 @@ vm_object_deactivate_pages(object)
vm_page_deactivate(p);
}
}
#endif
/*
* Trim the object cache to size.
*/
void
static void
vm_object_cache_trim()
{
register vm_object_t object;
@ -1304,8 +1309,10 @@ vm_object_in_map( object)
}
void
vm_object_check() {
#ifdef DDB
static void
DDB_vm_object_check()
{
vm_object_t object;
/*
@ -1330,6 +1337,7 @@ vm_object_check() {
}
}
}
#endif /* DDB */
/*
* vm_object_print: [ debug ]

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_object.h,v 1.24 1995/12/07 12:48:22 davidg Exp $
* $Id: vm_object.h,v 1.25 1995/12/11 04:58:23 dyson Exp $
*/
/*
@ -163,11 +163,9 @@ vm_object_pip_wakeup(vm_object_t object)
vm_object_t vm_object_allocate __P((objtype_t, vm_size_t));
void vm_object_cache_clear __P((void));
void vm_object_cache_trim __P((void));
boolean_t vm_object_coalesce __P((vm_object_t, vm_pindex_t, vm_size_t, vm_size_t));
void vm_object_collapse __P((vm_object_t));
void vm_object_copy __P((vm_object_t, vm_pindex_t, vm_object_t *, vm_pindex_t *, boolean_t *));
void vm_object_deactivate_pages __P((vm_object_t));
void vm_object_deallocate __P((vm_object_t));
void vm_object_init __P((void));
void vm_object_page_clean __P((vm_object_t, vm_pindex_t, vm_pindex_t, boolean_t, boolean_t));
@ -176,7 +174,6 @@ void vm_object_pmap_copy __P((vm_object_t, vm_pindex_t, vm_pindex_t));
void vm_object_pmap_remove __P((vm_object_t, vm_pindex_t, vm_pindex_t));
void vm_object_reference __P((vm_object_t));
void vm_object_shadow __P((vm_object_t *, vm_ooffset_t *, vm_size_t));
void vm_object_terminate __P((vm_object_t));
#endif /* KERNEL */
#endif /* _VM_OBJECT_ */

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
* $Id: vm_page.c,v 1.41 1995/12/11 04:58:25 dyson Exp $
* $Id: vm_page.c,v 1.42 1995/12/11 15:41:50 dyson Exp $
*/
/*
@ -86,7 +86,7 @@
#include <vm/vm_extern.h>
#ifdef DDB
extern void print_page_info __P((void));
extern void DDB_print_page_info __P((void));
#endif
/*
@ -94,8 +94,8 @@ extern void print_page_info __P((void));
* page structure.
*/
struct pglist *vm_page_buckets; /* Array of buckets */
int vm_page_bucket_count; /* How big is array? */
static struct pglist *vm_page_buckets; /* Array of buckets */
static int vm_page_bucket_count; /* How big is array? */
static int vm_page_hash_mask; /* Mask for hash function */
struct pglist vm_page_queue_free;
@ -104,17 +104,12 @@ struct pglist vm_page_queue_active;
struct pglist vm_page_queue_inactive;
struct pglist vm_page_queue_cache;
/* has physical page allocation been initialized? */
boolean_t vm_page_startup_initialized;
vm_page_t vm_page_array;
int vm_page_array_size;
static int vm_page_array_size;
long first_page;
long last_page;
vm_offset_t first_phys_addr;
vm_offset_t last_phys_addr;
vm_size_t page_mask;
int page_shift;
static long last_page;
static vm_size_t page_mask;
static int page_shift;
int vm_page_zero_count;
/*
@ -1123,7 +1118,7 @@ vm_page_test_dirty(m)
#ifdef DDB
void
print_page_info(void)
DDB_print_page_info(void)
{
printf("cnt.v_free_count: %d\n", cnt.v_free_count);
printf("cnt.v_cache_count: %d\n", cnt.v_cache_count);

View File

@ -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.61 1995/12/07 12:48:24 davidg Exp $
* $Id: vm_pageout.c,v 1.62 1995/12/11 04:58:28 dyson Exp $
*/
/*
@ -115,7 +115,7 @@ SYSINIT_KT(pagedaemon, SI_SUB_KTHREAD_PAGE, SI_ORDER_FIRST, kproc_start, &page_k
/* the kernel process "vm_daemon"*/
static void vm_daemon __P((void));
struct proc *vmproc;
static struct proc *vmproc;
static struct kproc_desc vm_kp = {
"vmdaemon",
@ -130,8 +130,8 @@ int vm_pages_needed; /* Event on which pageout daemon sleeps */
int vm_pageout_pages_needed; /* flag saying that the pageout daemon needs pages */
extern int npendingio;
int vm_pageout_req_swapout; /* XXX */
int vm_daemon_needed;
static int vm_pageout_req_swapout; /* XXX */
static int vm_daemon_needed;
extern int nswiodone;
extern int vm_swap_size;
extern int vfs_update_wakeup;

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_pager.c,v 1.19 1995/12/07 12:48:26 davidg Exp $
* $Id: vm_pager.c,v 1.20 1995/12/11 04:58:29 dyson Exp $
*/
/*
@ -110,9 +110,8 @@ static int npagers = sizeof(pagertab) / sizeof(pagertab[0]);
int pager_map_size = PAGER_MAP_SIZE;
vm_map_t pager_map;
boolean_t pager_map_wanted;
int bswneeded;
vm_offset_t swapbkva; /* swap buffers kva */
static int bswneeded;
static vm_offset_t swapbkva; /* swap buffers kva */
void
vm_pager_init()

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)vm_swap.c 8.5 (Berkeley) 2/17/94
* $Id: vm_swap.c,v 1.31 1995/12/10 19:53:42 bde Exp $
* $Id: vm_swap.c,v 1.32 1995/12/13 15:13:57 julian Exp $
*/
#include <sys/param.h>
@ -52,6 +52,7 @@
#include <miscfs/specfs/specdev.h>
static void swstrategy __P((struct buf *));
#define CDEV_MAJOR 4
#define BDEV_MAJOR 1
@ -76,11 +77,12 @@ static struct cdevsw sw_cdevsw =
static struct swdevt should_be_malloced[NSWAPDEV];
static struct swdevt *swdevt = should_be_malloced;
struct vnode *swapdev_vp;
/* XXX swapinfo(8) needs this one I belive */
int nswap; /* first block after the interleaved devs */
static int nswdev = NSWAPDEV;
int vm_swap_size;
void
static void
swstrategy(bp)
register struct buf *bp;
{

View File

@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91
* $Id: vnode_pager.c,v 1.54 1995/12/07 12:48:31 davidg Exp $
* $Id: vnode_pager.c,v 1.55 1995/12/11 04:58:32 dyson Exp $
*/
/*
@ -71,11 +71,15 @@
#include <vm/vnode_pager.h>
#include <vm/vm_extern.h>
extern vm_offset_t vnode_pager_addr __P((struct vnode *vp, vm_ooffset_t address,
static vm_offset_t vnode_pager_addr __P((struct vnode *vp, vm_ooffset_t address,
int *run));
extern void vnode_pager_iodone __P((struct buf *bp));
extern int vnode_pager_input_smlfs __P((vm_object_t object, vm_page_t m));
extern int vnode_pager_input_old __P((vm_object_t object, vm_page_t m));
static void vnode_pager_iodone __P((struct buf *bp));
static int vnode_pager_input_smlfs __P((vm_object_t object, vm_page_t m));
static int vnode_pager_input_old __P((vm_object_t object, vm_page_t m));
static void vnode_pager_dealloc __P((vm_object_t));
static int vnode_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
static int vnode_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
static boolean_t vnode_pager_haspage __P((vm_object_t, vm_pindex_t, int *, int *));
struct pagerops vnodepagerops = {
NULL,
@ -167,7 +171,7 @@ vnode_pager_alloc(handle, size, prot, offset)
return (object);
}
void
static void
vnode_pager_dealloc(object)
vm_object_t object;
{
@ -193,7 +197,7 @@ vnode_pager_dealloc(object)
vrele(vp);
}
boolean_t
static boolean_t
vnode_pager_haspage(object, pindex, before, after)
vm_object_t object;
vm_pindex_t pindex;
@ -370,7 +374,7 @@ vnode_pager_freepage(m)
* calculate the linear (byte) disk address of specified virtual
* file address
*/
vm_offset_t
static vm_offset_t
vnode_pager_addr(vp, address, run)
struct vnode *vp;
vm_ooffset_t address;
@ -413,7 +417,7 @@ vnode_pager_addr(vp, address, run)
/*
* interrupt routine for I/O completion
*/
void
static void
vnode_pager_iodone(bp)
struct buf *bp;
{
@ -424,7 +428,7 @@ vnode_pager_iodone(bp)
/*
* small block file system vnode pager input
*/
int
static int
vnode_pager_input_smlfs(object, m)
vm_object_t object;
vm_page_t m;
@ -514,7 +518,7 @@ vnode_pager_input_smlfs(object, m)
/*
* old style vnode pager output routine
*/
int
static int
vnode_pager_input_old(object, m)
vm_object_t object;
vm_page_t m;
@ -574,7 +578,7 @@ vnode_pager_input_old(object, m)
* generic vnode pager input routine
*/
int
static int
vnode_pager_getpages(object, m, count, reqpage)
vm_object_t object;
vm_page_t *m;
@ -816,7 +820,7 @@ vnode_pager_leaf_getpages(object, m, count, reqpage)
return (error ? VM_PAGER_ERROR : VM_PAGER_OK);
}
int
static int
vnode_pager_putpages(object, m, count, sync, rtvals)
vm_object_t object;
vm_page_t *m;
@ -911,7 +915,7 @@ vnode_pager_leaf_putpages(object, m, count, sync, rtvals)
printf("vnode_pager_putpages: I/O error %d\n", error);
}
if (auio.uio_resid) {
printf("vnode_pager_putpages: residual I/O %d at %d\n",
printf("vnode_pager_putpages: residual I/O %d at %ld\n",
auio.uio_resid, m[0]->pindex);
}
for (i = 0; i < count; i++) {

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vnode_pager.h 8.1 (Berkeley) 6/11/93
* $Id: vnode_pager.h,v 1.6 1995/09/06 05:37:43 dyson Exp $
* $Id: vnode_pager.h,v 1.7 1995/12/11 04:58:34 dyson Exp $
*/
#ifndef _VNODE_PAGER_
@ -44,12 +44,8 @@
#ifdef KERNEL
vm_object_t vnode_pager_alloc __P((void *, vm_size_t, vm_prot_t, vm_ooffset_t));
void vnode_pager_dealloc __P((vm_object_t));
int vnode_pager_getpages __P((vm_object_t, vm_page_t *, int, int));
int vnode_pager_putpages __P((vm_object_t, vm_page_t *, int, boolean_t, int *));
boolean_t vnode_pager_haspage __P((vm_object_t, vm_pindex_t, int *, int *));
struct vnode *vnode_pager_lock __P((vm_object_t));
void vnode_pager_freepage __P((vm_page_t m));
struct vnode *vnode_pager_lock __P((vm_object_t));
#endif
#endif /* _VNODE_PAGER_ */