summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-12-17 21:14:36 +0000
committerphk <phk@FreeBSD.org>1995-12-17 21:14:36 +0000
commit2a5a36a02853b65f9dcdd33ca804b7b132403350 (patch)
tree0abc9dfd2498cac032fdc78b264f4351548fce5a /sys/nfsserver
parentbaca7dc09c90e600a6551ac34435856837a2a2fd (diff)
downloadFreeBSD-src-2a5a36a02853b65f9dcdd33ca804b7b132403350.zip
FreeBSD-src-2a5a36a02853b65f9dcdd33ca804b7b132403350.tar.gz
Staticize.
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs.h18
-rw-r--r--sys/nfsserver/nfs_serv.c18
-rw-r--r--sys/nfsserver/nfs_srvcache.c7
-rw-r--r--sys/nfsserver/nfs_srvsock.c26
-rw-r--r--sys/nfsserver/nfs_srvsubs.c11
-rw-r--r--sys/nfsserver/nfs_syscalls.c17
-rw-r--r--sys/nfsserver/nfsrvstats.h18
7 files changed, 60 insertions, 55 deletions
diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h
index 58b1e97..03464f4 100644
--- a/sys/nfsserver/nfs.h
+++ b/sys/nfsserver/nfs.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id: nfs.h,v 1.14 1995/11/21 12:54:38 bde Exp $
+ * $Id: nfs.h,v 1.15 1995/12/03 10:02:41 bde Exp $
*/
#ifndef _NFS_NFS_H_
@@ -502,8 +502,6 @@ int nfsm_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *));
void nfsm_srvfattr __P((struct nfsrv_descript *,struct vattr *,struct nfs_fattr *));
void nfsm_srvwcc __P((struct nfsrv_descript *,int,struct vattr *,int,struct vattr *,struct mbuf **,char **));
void nfsm_srvpostopattr __P((struct nfsrv_descript *,int,struct vattr *,struct mbuf **,char **));
-int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **,struct ucred *,struct nfssvc_sock *,struct mbuf *,int *,int));
-int nfsrv_access __P((struct vnode *,int,struct ucred *,int,struct proc *));
int netaddr_match __P((int,union nethostaddr *,struct mbuf *));
int nfs_request __P((struct vnode *,struct mbuf *,int,struct proc *,struct ucred *,struct mbuf **,struct mbuf **,caddr_t *));
int nfs_loadattrcache __P((struct vnode **,struct mbuf **,caddr_t *,struct vattr *));
@@ -511,26 +509,19 @@ int nfs_namei __P((struct nameidata *,fhandle_t *,int,struct nfssvc_sock *,struc
void nfsm_adj __P((struct mbuf *,int,int));
int nfsm_mbuftouio __P((struct mbuf **,struct uio *,int,caddr_t *));
void nfsrv_initcache __P((void));
-int nfs_rcvlock __P((struct nfsreq *));
-void nfs_rcvunlock __P((int *flagp));
int nfs_getauth __P((struct nfsmount *,struct nfsreq *,struct ucred *,char **,int *,char *,int *,NFSKERBKEY_T));
int nfs_getnickauth __P((struct nfsmount *,struct ucred *,char **,int *,char *,int));
int nfs_savenickauth __P((struct nfsmount *,struct ucred *,int,NFSKERBKEY_T,struct mbuf **,char **,struct mbuf *));
-int nfs_msg __P((struct proc *,char *,char *));
int nfs_adv __P((struct mbuf **,caddr_t *,int,int));
-int nfsrv_getstream __P((struct nfssvc_sock *,int));
void nfs_nhinit __P((void));
void nfs_timer __P((void*));
u_long nfs_hash __P((nfsfh_t *,int));
-int nfssvc_iod __P((struct proc *));
-int nfssvc_nfsd __P((struct nfsd_srvargs *,caddr_t,struct proc *));
-int nfssvc_addsock __P((struct file *,struct mbuf *));
void nfsrv_slpderef __P((struct nfssvc_sock *slp));
int nfsrv_dorec __P((struct nfssvc_sock *,struct nfsd *,struct nfsrv_descript **));
void nfsrv_cleancache __P((void));
int nfsrv_getcache __P((struct nfsrv_descript *,struct nfssvc_sock *,struct mbuf **));
+int nfs_init __P((void));
void nfsrv_updatecache __P((struct nfsrv_descript *,int,struct mbuf *));
-int mountnfs __P((struct nfs_args *,struct mount *,struct mbuf *,char *,char *,struct vnode **));
int nfs_connect __P((struct nfsmount *,struct nfsreq *));
void nfs_disconnect __P((struct nfsmount *nmp));
int nfs_getattrcache __P((struct vnode *,struct vattr *));
@@ -540,7 +531,6 @@ int nfsm_uiotombuf __P((struct uio *,struct mbuf **,int,caddr_t *));
void nfsrv_init __P((int));
void nfs_clearcommit __P((struct mount *));
int nfsrv_errmap __P((struct nfsrv_descript *, int));
-void nfsrvw_coalesce __P((struct nfsrv_descript *,struct nfsrv_descript *));
void nfsrv_rcv __P((struct socket *so, caddr_t arg, int waitflag));
void nfsrvw_sort __P((gid_t [],int));
void nfsrv_setcred __P((struct ucred *,struct ucred *));
@@ -560,6 +550,9 @@ int nfsrv_commit __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
int nfsrv_create __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
+int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **,
+ struct ucred *,struct nfssvc_sock *,struct mbuf *,
+ int *,int));
int nfsrv_fsinfo __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
int nfsrv_getattr __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
@@ -604,6 +597,7 @@ int nfsrv_symlink __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
+
#endif /* KERNEL */
#endif
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 0173c99..3fc96a4 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_serv.c,v 1.25 1995/10/29 15:32:59 phk Exp $
+ * $Id: nfs_serv.c,v 1.26 1995/12/07 12:47:25 davidg Exp $
*/
/*
@@ -70,6 +70,7 @@
#include <sys/dirent.h>
#include <sys/stat.h>
#include <sys/kernel.h>
+#include <sys/sysctl.h>
#include <ufs/ufs/dir.h>
#include <vm/vm.h>
@@ -95,11 +96,14 @@ nfstype nfsv3_type[9] = { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFSOCK,
NFFIFO, NFNON };
int nfsrvw_procrastinate = NFS_GATHERDELAY * 1000;
-#ifdef NFS_ASYNC
-int nfs_async = 1;
-#else
int nfs_async;
-#endif
+SYSCTL_INT(_fs_nfs, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0, "");
+
+
+static int nfsrv_access __P((struct vnode *,int,struct ucred *,int,
+ struct proc *));
+static void nfsrvw_coalesce __P((struct nfsrv_descript *,
+ struct nfsrv_descript *));
/*
* nfs v3 access service
@@ -1198,7 +1202,7 @@ loop1:
* - put nfsd on owp's nd_coalesce list
* NB: Must be called at splsoftclock().
*/
-void
+static void
nfsrvw_coalesce(owp, nfsd)
register struct nfsrv_descript *owp;
register struct nfsrv_descript *nfsd;
@@ -3390,7 +3394,7 @@ nfsrv_noop(nfsd, slp, procp, mrq)
* this because it opens a security hole, but since the nfs server opens
* a security hole the size of a barn door anyhow, what the heck.
*/
-int
+static int
nfsrv_access(vp, flags, cred, rdonly, p)
register struct vnode *vp;
int flags;
diff --git a/sys/nfsserver/nfs_srvcache.c b/sys/nfsserver/nfs_srvcache.c
index acdce0d..574729c 100644
--- a/sys/nfsserver/nfs_srvcache.c
+++ b/sys/nfsserver/nfs_srvcache.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_srvcache.c 8.1 (Berkeley) 6/10/93
- * $Id: nfs_srvcache.c,v 1.5 1994/10/17 17:47:36 phk Exp $
+ * $Id: nfs_srvcache.c,v 1.6 1995/06/27 11:06:43 dfr Exp $
*/
/*
@@ -66,7 +66,8 @@
extern struct nfsstats nfsstats;
extern int nfsv2_procid[NFS_NPROCS];
-long numnfsrvcache, desirednfsrvcache = NFSRVCACHESIZ;
+long numnfsrvcache;
+static long desirednfsrvcache = NFSRVCACHESIZ;
#define NFSRCHASH(xid) \
(&nfsrvhashtbl[((xid) + ((xid) >> 24)) & nfsrvhash])
@@ -83,7 +84,7 @@ u_long nfsrvhash;
/*
* Static array that defines which nfs rpc's are nonidempotent
*/
-int nonidempotent[NFS_NPROCS] = {
+static int nonidempotent[NFS_NPROCS] = {
FALSE,
FALSE,
TRUE,
diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c
index f497afe..0059f5e 100644
--- a/sys/nfsserver/nfs_srvsock.c
+++ b/sys/nfsserver/nfs_srvsock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_socket.c,v 1.11 1995/11/21 15:51:32 bde Exp $
+ * $Id: nfs_socket.c,v 1.12 1995/12/03 10:02:59 bde Exp $
*/
/*
@@ -134,10 +134,14 @@ static int nfs_backoff[8] = { 2, 4, 8, 16, 32, 64, 128, 256, };
int nfsrtton = 0;
struct nfsrtt nfsrtt;
-extern void nfs_realign __P((struct mbuf *m, int hsiz));
-extern int nfs_receive __P((struct nfsreq *rep, struct mbuf **aname,
+static int nfs_msg __P((struct proc *,char *,char *));
+static int nfs_rcvlock __P((struct nfsreq *));
+static void nfs_rcvunlock __P((int *flagp));
+static void nfs_realign __P((struct mbuf *m, int hsiz));
+static int nfs_receive __P((struct nfsreq *rep, struct mbuf **aname,
struct mbuf **mp));
-extern int nfs_reconnect __P((struct nfsreq *rep));
+static int nfs_reconnect __P((struct nfsreq *rep));
+static int nfsrv_getstream __P((struct nfssvc_sock *,int));
int (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *nd,
struct nfssvc_sock *slp,
@@ -317,7 +321,7 @@ bad:
* If this fails the mount point is DEAD!
* nb: Must be called with the nfs_sndlock() set on the mount point.
*/
-int
+static int
nfs_reconnect(rep)
register struct nfsreq *rep;
{
@@ -441,7 +445,7 @@ nfs_send(so, nam, top, rep)
* For SOCK_STREAM we must be very careful to read an entire record once
* we have read any of it, even if the system call has been interrupted.
*/
-int
+static int
nfs_receive(rep, aname, mp)
register struct nfsreq *rep;
struct mbuf **aname;
@@ -1456,7 +1460,7 @@ nfs_sndunlock(flagp)
}
}
-int
+static int
nfs_rcvlock(rep)
register struct nfsreq *rep;
{
@@ -1485,7 +1489,7 @@ nfs_rcvlock(rep)
/*
* Unlock the stream socket for others.
*/
-void
+static void
nfs_rcvunlock(flagp)
register int *flagp;
{
@@ -1503,7 +1507,7 @@ nfs_rcvunlock(flagp)
* Check for badly aligned mbuf data areas and
* realign data in an mbuf list by copying the data areas up, as required.
*/
-void
+static void
nfs_realign(m, hsiz)
register struct mbuf *m;
int hsiz;
@@ -1708,7 +1712,7 @@ dorecs:
* stream socket. The "waitflag" argument indicates whether or not it
* can sleep.
*/
-int
+static int
nfsrv_getstream(slp, waitflag)
register struct nfssvc_sock *slp;
int waitflag;
@@ -2142,7 +2146,7 @@ nfsrv_wakenfsd(slp)
nfsd_head_flag |= NFSD_CHECKSLP;
}
-int
+static int
nfs_msg(p, server, msg)
struct proc *p;
char *server, *msg;
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index d590ce4..46327bf 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_subs.c,v 1.24 1995/10/29 15:33:08 phk Exp $
+ * $Id: nfs_subs.c,v 1.25 1995/12/07 12:47:26 davidg Exp $
*/
/*
@@ -93,8 +93,13 @@ u_long nfs_prog, nqnfs_prog, nfs_true, nfs_false;
/* And other global data */
static u_long nfs_xid = 0;
-enum vtype nv2tov_type[8] = { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON };
-enum vtype nv3tov_type[8]={ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO };
+static enum vtype nv2tov_type[8]= {
+ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON
+};
+enum vtype nv3tov_type[8]= {
+ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO
+};
+
int nfs_ticks;
struct nfs_reqq nfs_reqq;
diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c
index 44789f7..68d7dc1 100644
--- a/sys/nfsserver/nfs_syscalls.c
+++ b/sys/nfsserver/nfs_syscalls.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_syscalls.c,v 1.10 1995/11/21 15:51:34 bde Exp $
+ * $Id: nfs_syscalls.c,v 1.11 1995/12/03 10:03:06 bde Exp $
*/
#include <sys/param.h>
@@ -86,14 +86,14 @@ extern int nfsrtton;
extern struct nfsstats nfsstats;
extern int nfsrvw_procrastinate;
struct nfssvc_sock *nfs_udpsock, *nfs_cltpsock;
-int nuidhash_max = NFS_MAXUIDHASH;
+static int nuidhash_max = NFS_MAXUIDHASH;
static int nfs_numnfsd = 0;
int nfsd_waiting = 0;
static int notstarted = 1;
static int modify_flag = 0;
static struct nfsdrt nfsdrt;
-extern void nfsrv_zapsock __P((struct nfssvc_sock *slp));
+static void nfsrv_zapsock __P((struct nfssvc_sock *slp));
#define TRUE 1
#define FALSE 0
@@ -102,6 +102,9 @@ static int nfs_asyncdaemon[NFS_MAXASYNCDAEMON];
static void nfsd_rt __P((int sotype, struct nfsrv_descript *nd,
int cacherep));
+static int nfssvc_addsock __P((struct file *,struct mbuf *));
+static int nfssvc_iod __P((struct proc *));
+static int nfssvc_nfsd __P((struct nfsd_srvargs *,caddr_t,struct proc *));
/*
* NFS server system calls
@@ -332,7 +335,7 @@ nfssvc(p, uap, retval)
/*
* Adds a socket to the list for servicing by nfsds.
*/
-int
+static int
nfssvc_addsock(fp, mynam)
struct file *fp;
struct mbuf *mynam;
@@ -422,7 +425,7 @@ nfssvc_addsock(fp, mynam)
* Called by nfssvc() for nfsds. Just loops around servicing rpc requests
* until it is killed by a signal.
*/
-int
+static int
nfssvc_nfsd(nsd, argp, p)
struct nfsd_srvargs *nsd;
caddr_t argp;
@@ -705,7 +708,7 @@ done:
* They do read-ahead and write-behind operations on the block I/O cache.
* Never returns unless it fails or gets killed.
*/
-int
+static int
nfssvc_iod(p)
struct proc *p;
{
@@ -788,7 +791,7 @@ nfssvc_iod(p)
* will stop using it and clear ns_flag at the end so that it will not be
* reassigned during cleanup.
*/
-void
+static void
nfsrv_zapsock(slp)
register struct nfssvc_sock *slp;
{
diff --git a/sys/nfsserver/nfsrvstats.h b/sys/nfsserver/nfsrvstats.h
index 58b1e97..03464f4 100644
--- a/sys/nfsserver/nfsrvstats.h
+++ b/sys/nfsserver/nfsrvstats.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id: nfs.h,v 1.14 1995/11/21 12:54:38 bde Exp $
+ * $Id: nfs.h,v 1.15 1995/12/03 10:02:41 bde Exp $
*/
#ifndef _NFS_NFS_H_
@@ -502,8 +502,6 @@ int nfsm_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *));
void nfsm_srvfattr __P((struct nfsrv_descript *,struct vattr *,struct nfs_fattr *));
void nfsm_srvwcc __P((struct nfsrv_descript *,int,struct vattr *,int,struct vattr *,struct mbuf **,char **));
void nfsm_srvpostopattr __P((struct nfsrv_descript *,int,struct vattr *,struct mbuf **,char **));
-int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **,struct ucred *,struct nfssvc_sock *,struct mbuf *,int *,int));
-int nfsrv_access __P((struct vnode *,int,struct ucred *,int,struct proc *));
int netaddr_match __P((int,union nethostaddr *,struct mbuf *));
int nfs_request __P((struct vnode *,struct mbuf *,int,struct proc *,struct ucred *,struct mbuf **,struct mbuf **,caddr_t *));
int nfs_loadattrcache __P((struct vnode **,struct mbuf **,caddr_t *,struct vattr *));
@@ -511,26 +509,19 @@ int nfs_namei __P((struct nameidata *,fhandle_t *,int,struct nfssvc_sock *,struc
void nfsm_adj __P((struct mbuf *,int,int));
int nfsm_mbuftouio __P((struct mbuf **,struct uio *,int,caddr_t *));
void nfsrv_initcache __P((void));
-int nfs_rcvlock __P((struct nfsreq *));
-void nfs_rcvunlock __P((int *flagp));
int nfs_getauth __P((struct nfsmount *,struct nfsreq *,struct ucred *,char **,int *,char *,int *,NFSKERBKEY_T));
int nfs_getnickauth __P((struct nfsmount *,struct ucred *,char **,int *,char *,int));
int nfs_savenickauth __P((struct nfsmount *,struct ucred *,int,NFSKERBKEY_T,struct mbuf **,char **,struct mbuf *));
-int nfs_msg __P((struct proc *,char *,char *));
int nfs_adv __P((struct mbuf **,caddr_t *,int,int));
-int nfsrv_getstream __P((struct nfssvc_sock *,int));
void nfs_nhinit __P((void));
void nfs_timer __P((void*));
u_long nfs_hash __P((nfsfh_t *,int));
-int nfssvc_iod __P((struct proc *));
-int nfssvc_nfsd __P((struct nfsd_srvargs *,caddr_t,struct proc *));
-int nfssvc_addsock __P((struct file *,struct mbuf *));
void nfsrv_slpderef __P((struct nfssvc_sock *slp));
int nfsrv_dorec __P((struct nfssvc_sock *,struct nfsd *,struct nfsrv_descript **));
void nfsrv_cleancache __P((void));
int nfsrv_getcache __P((struct nfsrv_descript *,struct nfssvc_sock *,struct mbuf **));
+int nfs_init __P((void));
void nfsrv_updatecache __P((struct nfsrv_descript *,int,struct mbuf *));
-int mountnfs __P((struct nfs_args *,struct mount *,struct mbuf *,char *,char *,struct vnode **));
int nfs_connect __P((struct nfsmount *,struct nfsreq *));
void nfs_disconnect __P((struct nfsmount *nmp));
int nfs_getattrcache __P((struct vnode *,struct vattr *));
@@ -540,7 +531,6 @@ int nfsm_uiotombuf __P((struct uio *,struct mbuf **,int,caddr_t *));
void nfsrv_init __P((int));
void nfs_clearcommit __P((struct mount *));
int nfsrv_errmap __P((struct nfsrv_descript *, int));
-void nfsrvw_coalesce __P((struct nfsrv_descript *,struct nfsrv_descript *));
void nfsrv_rcv __P((struct socket *so, caddr_t arg, int waitflag));
void nfsrvw_sort __P((gid_t [],int));
void nfsrv_setcred __P((struct ucred *,struct ucred *));
@@ -560,6 +550,9 @@ int nfsrv_commit __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
int nfsrv_create __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
+int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **,
+ struct ucred *,struct nfssvc_sock *,struct mbuf *,
+ int *,int));
int nfsrv_fsinfo __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
int nfsrv_getattr __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
@@ -604,6 +597,7 @@ int nfsrv_symlink __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
+
#endif /* KERNEL */
#endif
OpenPOWER on IntegriCloud