diff options
-rw-r--r-- | sys/nfs/krpc_subr.c | 33 | ||||
-rw-r--r-- | sys/nfs/nfs_bio.c | 24 | ||||
-rw-r--r-- | sys/nfs/nfs_boot.c | 50 | ||||
-rw-r--r-- | sys/nfs/nfs_serv.c | 172 | ||||
-rw-r--r-- | sys/nfs/nfs_socket.c | 74 | ||||
-rw-r--r-- | sys/nfs/nfs_subs.c | 114 | ||||
-rw-r--r-- | sys/nfs/nfs_syscalls.c | 18 | ||||
-rw-r--r-- | sys/nfs/nfs_vfsops.c | 87 | ||||
-rw-r--r-- | sys/nfs/nfs_vnops.c | 195 |
9 files changed, 217 insertions, 550 deletions
diff --git a/sys/nfs/krpc_subr.c b/sys/nfs/krpc_subr.c index 59d200f098d..270cf9fb13a 100644 --- a/sys/nfs/krpc_subr.c +++ b/sys/nfs/krpc_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: krpc_subr.c,v 1.19 2009/02/22 07:47:22 otto Exp $ */ +/* $OpenBSD: krpc_subr.c,v 1.20 2009/10/19 22:24:18 jsg Exp $ */ /* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */ /* @@ -147,10 +147,7 @@ krpc_get_xid(void) * Returns non-zero error on failure. */ int -krpc_portmap(sin, prog, vers, portp) - struct sockaddr_in *sin; /* server address */ - u_int prog, vers; /* host order */ - u_int16_t *portp; /* network order */ +krpc_portmap(struct sockaddr_in *sin, u_int prog, u_int vers, u_int16_t *portp) { struct sdata { u_int32_t prog; /* call program */ @@ -203,14 +200,12 @@ krpc_portmap(sin, prog, vers, portp) * Do a remote procedure call (RPC) and wait for its reply. * If from_p is non-null, then we are doing broadcast, and * the address from whence the response came is saved there. + * data: input/output + * from_p: output */ int -krpc_call(sa, prog, vers, func, data, from_p, retries) - struct sockaddr_in *sa; - u_int prog, vers, func; - struct mbuf **data; /* input/output */ - struct mbuf **from_p; /* output */ - int retries; +krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, + struct mbuf **data, struct mbuf **from_p, int retries) { struct socket *so; struct sockaddr_in *sin; @@ -478,9 +473,7 @@ struct xdr_string { }; struct mbuf * -xdr_string_encode(str, len) - char *str; - int len; +xdr_string_encode(char *str, int len) { struct mbuf *m; struct xdr_string *xs; @@ -509,10 +502,7 @@ xdr_string_encode(str, len) } struct mbuf * -xdr_string_decode(m, str, len_p) - struct mbuf *m; - char *str; - int *len_p; /* bufsize - 1 */ +xdr_string_decode(struct mbuf *m, char *str, int *len_p) { struct xdr_string *xs; int mlen; /* message length */ @@ -553,8 +543,7 @@ struct xdr_inaddr { }; struct mbuf * -xdr_inaddr_encode(ia) - struct in_addr *ia; /* already in network order */ +xdr_inaddr_encode(struct in_addr *ia) { struct mbuf *m; struct xdr_inaddr *xi; @@ -576,9 +565,7 @@ xdr_inaddr_encode(ia) } struct mbuf * -xdr_inaddr_decode(m, ia) - struct mbuf *m; - struct in_addr *ia; /* already in network order */ +xdr_inaddr_decode(struct mbuf *m, struct in_addr *ia) { struct xdr_inaddr *xi; u_int8_t *cp; diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index f670a997e02..8e09e51a3dd 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_bio.c,v 1.67 2009/09/02 18:20:54 thib Exp $ */ +/* $OpenBSD: nfs_bio.c,v 1.68 2009/10/19 22:24:18 jsg Exp $ */ /* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */ /* @@ -67,11 +67,7 @@ uint32_t nfs_bufqmax, nfs_bufqlen; * Any similarity to readip() is purely coincidental */ int -nfs_bioread(vp, uio, ioflag, cred) - struct vnode *vp; - struct uio *uio; - int ioflag; - struct ucred *cred; +nfs_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) { struct nfsnode *np = VTONFS(vp); int biosize, diff; @@ -251,8 +247,7 @@ again: * Vnode op for write using bio */ int -nfs_write(v) - void *v; +nfs_write(void *v) { struct vop_write_args *ap = v; int biosize; @@ -431,11 +426,7 @@ again: * NULL. */ struct buf * -nfs_getcacheblk(vp, bn, size, p) - struct vnode *vp; - daddr64_t bn; - int size; - struct proc *p; +nfs_getcacheblk(struct vnode *vp, daddr64_t bn, int size, struct proc *p) { struct buf *bp; struct nfsmount *nmp = VFSTONFS(vp->v_mount); @@ -506,8 +497,7 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred, struct proc *p) * are all hung on a dead server. */ int -nfs_asyncio(bp) - struct buf *bp; +nfs_asyncio(struct buf *bp) { if (nfs_numasync == 0) goto out; @@ -535,9 +525,7 @@ out: * synchronously or from an nfsiod. */ int -nfs_doio(bp, p) - struct buf *bp; - struct proc *p; +nfs_doio(struct buf *bp, struct proc *p) { struct uio *uiop; struct vnode *vp; diff --git a/sys/nfs/nfs_boot.c b/sys/nfs/nfs_boot.c index f0bb778b332..0ce38f5e9fb 100644 --- a/sys/nfs/nfs_boot.c +++ b/sys/nfs/nfs_boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_boot.c,v 1.24 2008/06/11 04:52:27 blambert Exp $ */ +/* $OpenBSD: nfs_boot.c,v 1.25 2009/10/19 22:24:18 jsg Exp $ */ /* $NetBSD: nfs_boot.c,v 1.26 1996/05/07 02:51:25 thorpej Exp $ */ /* @@ -60,19 +60,14 @@ #if !defined(NFSCLIENT) || (NETHER == 0 && NFDDI == 0) int -nfs_boot_init(nd, procp) - struct nfs_diskless *nd; - struct proc *procp; +nfs_boot_init(struct nfs_diskless *nd, struct proc *procp) { panic("nfs_boot_init: NFSCLIENT not enabled in kernel"); } int -nfs_boot_getfh(bpsin, key, ndmntp, retries) - struct sockaddr_in *bpsin; - char *key; - struct nfs_dlmount *ndmntp; - int retries; +nfs_boot_getfh(struct sockaddr_in *bpsin, char *key, + struct nfs_dlmount *ndmntp, int retries) { /* can not get here */ return (EOPNOTSUPP); @@ -116,9 +111,7 @@ char *nfsbootdevname; * Called with an empty nfs_diskless struct to be filled in. */ int -nfs_boot_init(nd, procp) - struct nfs_diskless *nd; - struct proc *procp; +nfs_boot_init(struct nfs_diskless *nd, struct proc *procp) { struct ifreq ireq; struct in_addr my_ip, gw_ip; @@ -262,12 +255,14 @@ nfs_boot_init(nd, procp) return (0); } +/* + * bpsin: bootparam server + * key: root or swap + * ndmntp: output + */ int -nfs_boot_getfh(bpsin, key, ndmntp, retries) - struct sockaddr_in *bpsin; /* bootparam server */ - char *key; /* root or swap */ - struct nfs_dlmount *ndmntp; /* output */ - int retries; +nfs_boot_getfh(struct sockaddr_in *bpsin, char *key, + struct nfs_dlmount *ndmntp, int retries) { char pathname[MAXPATHLEN]; char *sp, *dp, *endp; @@ -334,10 +329,8 @@ nfs_boot_getfh(bpsin, key, ndmntp, retries) * know about us (don't want to broadcast a getport call). */ static int -bp_whoami(bpsin, my_ip, gw_ip) - struct sockaddr_in *bpsin; - struct in_addr *my_ip; - struct in_addr *gw_ip; +bp_whoami(struct sockaddr_in *bpsin, struct in_addr *my_ip, + struct in_addr *gw_ip) { /* RPC structures for PMAPPROC_CALLIT */ struct whoami_call { @@ -442,13 +435,8 @@ out: * server pathname */ static int -bp_getfile(bpsin, key, md_sin, serv_name, pathname, retries) - struct sockaddr_in *bpsin; - char *key; - struct sockaddr_in *md_sin; - char *serv_name; - char *pathname; - int retries; +bp_getfile(struct sockaddr_in *bpsin, char *key, struct sockaddr_in *md_sin, + char *serv_name, char *pathname, int retries) { struct mbuf *m; struct sockaddr_in *sin; @@ -520,12 +508,10 @@ out: * RPC: mountd/mount * Given a server pathname, get an NFS file handle. * Also, sets sin->sin_port to the NFS service port. + * mdsin: mountd server address */ static int -md_mount(mdsin, path, fhp) - struct sockaddr_in *mdsin; /* mountd server address */ - char *path; - u_char *fhp; +md_mount(struct sockaddr_in *mdsin, char *path, u_char *fhp) { /* The RPC structures */ struct rdata { diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index bcc67970e02..f5773a15fc7 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_serv.c,v 1.88 2009/08/30 15:16:19 thib Exp $ */ +/* $OpenBSD: nfs_serv.c,v 1.89 2009/10/19 22:24:18 jsg Exp $ */ /* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */ /* @@ -93,11 +93,8 @@ extern nfstype nfsv3_type[9]; * nfs v3 access service */ int -nfsrv3_access(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv3_access(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct nfsm_info info; @@ -160,11 +157,8 @@ nfsmout: * nfs getattr service */ int -nfsrv_getattr(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_getattr(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct nfsm_info info; @@ -210,11 +204,8 @@ nfsmout: * nfs setattr service */ int -nfsrv_setattr(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_setattr(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct nfsm_info info; @@ -350,11 +341,8 @@ nfsmout: * nfs lookup rpc */ int -nfsrv_lookup(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_lookup(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -427,11 +415,8 @@ nfsmout: * nfs readlink service */ int -nfsrv_readlink(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_readlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -517,11 +502,8 @@ nfsmout: * nfs read service */ int -nfsrv_read(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_read(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -690,11 +672,8 @@ bad: * nfs write service */ int -nfsrv_write(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_write(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -866,11 +845,8 @@ bad: * now does a truncate to 0 length via. setattr if it already exists */ int -nfsrv_create(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_create(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -1118,11 +1094,8 @@ nfsmout: * nfs v3 mknod service */ int -nfsrv_mknod(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_mknod(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -1270,11 +1243,8 @@ nfsmout: * nfs remove service */ int -nfsrv_remove(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_remove(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -1358,11 +1328,8 @@ nfsmout: * nfs rename service */ int -nfsrv_rename(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_rename(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -1552,11 +1519,8 @@ nfsmout: * nfs link service */ int -nfsrv_link(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_link(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct nfsm_info info; @@ -1655,11 +1619,8 @@ nfsmout: * nfs symbolic link service */ int -nfsrv_symlink(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_symlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -1804,11 +1765,8 @@ nfsmout: * nfs mkdir service */ int -nfsrv_mkdir(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_mkdir(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -1925,11 +1883,8 @@ nfsmout: * nfs rmdir service */ int -nfsrv_rmdir(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_rmdir(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -2054,11 +2009,8 @@ struct flrep { }; int -nfsrv_readdir(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_readdir(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -2277,11 +2229,8 @@ nfsmout: } int -nfsrv_readdirplus(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_readdirplus(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -2546,11 +2495,8 @@ nfsmout: * nfs commit service */ int -nfsrv_commit(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_commit(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -2609,11 +2555,8 @@ nfsmout: * nfs statfs service */ int -nfsrv_statfs(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_statfs(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -2689,11 +2632,8 @@ nfsmout: * nfs fsinfo service */ int -nfsrv_fsinfo(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_fsinfo(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -2760,11 +2700,8 @@ nfsmout: * nfs pathconf service */ int -nfsrv_pathconf(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_pathconf(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct mbuf *nam = nfsd->nd_nam; struct ucred *cred = &nfsd->nd_cr; @@ -2833,11 +2770,8 @@ nfsmout: */ /* ARGSUSED */ int -nfsrv_null(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_null(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct nfsm_info info; int error = NFSERR_RETVOID; @@ -2857,11 +2791,8 @@ nfsrv_null(nfsd, slp, procp, mrq) */ /* ARGSUSED */ int -nfsrv_noop(nfsd, slp, procp, mrq) - struct nfsrv_descript *nfsd; - struct nfssvc_sock *slp; - struct proc *procp; - struct mbuf **mrq; +nfsrv_noop(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, + struct proc *procp, struct mbuf **mrq) { struct nfsm_info info; int error; @@ -2895,13 +2826,8 @@ nfsrv_noop(nfsd, slp, procp, mrq) * error. */ int -nfsrv_access(vp, flags, cred, rdonly, p, override) - struct vnode *vp; - int flags; - struct ucred *cred; - int rdonly; - struct proc *p; - int override; +nfsrv_access(struct vnode *vp, int flags, struct ucred *cred, int rdonly, + struct proc *p, int override) { struct vattr vattr; int error; diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 8825f2e1bc0..e3135766eb1 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_socket.c,v 1.95 2009/08/25 13:41:29 thib Exp $ */ +/* $OpenBSD: nfs_socket.c,v 1.96 2009/10/19 22:24:18 jsg Exp $ */ /* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */ /* @@ -222,9 +222,7 @@ nfs_estimate_rto(struct nfsmount *nmp, u_int32_t procnum) * We do not free the sockaddr if error. */ int -nfs_connect(nmp, rep) - struct nfsmount *nmp; - struct nfsreq *rep; +nfs_connect(struct nfsmount *nmp, struct nfsreq *rep) { struct socket *so; int s, error, rcvreserve, sndreserve; @@ -382,8 +380,7 @@ bad: * nb: Must be called with the nfs_sndlock() set on the mount point. */ int -nfs_reconnect(rep) - struct nfsreq *rep; +nfs_reconnect(struct nfsreq *rep) { struct nfsreq *rp; struct nfsmount *nmp = rep->r_nmp; @@ -413,8 +410,7 @@ nfs_reconnect(rep) * NFS disconnect. Clean up and unlink. */ void -nfs_disconnect(nmp) - struct nfsmount *nmp; +nfs_disconnect(struct nfsmount *nmp) { struct socket *so; @@ -440,11 +436,8 @@ nfs_disconnect(nmp) * - do any cleanup required by recoverable socket errors (???) */ int -nfs_send(so, nam, top, rep) - struct socket *so; - struct mbuf *nam; - struct mbuf *top; - struct nfsreq *rep; +nfs_send(struct socket *so, struct mbuf *nam, struct mbuf *top, + struct nfsreq *rep) { struct mbuf *sendnam; int error, soflags, flags; @@ -505,10 +498,7 @@ nfs_send(so, nam, top, rep) * we have read any of it, even if the system call has been interrupted. */ int -nfs_receive(rep, aname, mp) - struct nfsreq *rep; - struct mbuf **aname; - struct mbuf **mp; +nfs_receive(struct nfsreq *rep, struct mbuf **aname, struct mbuf **mp) { struct socket *so; struct uio auio; @@ -730,8 +720,7 @@ errout: * with outstanding requests using the xid, until ours is found. */ int -nfs_reply(myrep) - struct nfsreq *myrep; +nfs_reply(struct nfsreq *myrep) { struct nfsreq *rep; struct nfsmount *nmp = myrep->r_nmp; @@ -1054,13 +1043,8 @@ nfsmout1: * siz arg. is used to decide if adding a cluster is worthwhile */ int -nfs_rephead(siz, nd, slp, err, mrq, mbp) - int siz; - struct nfsrv_descript *nd; - struct nfssvc_sock *slp; - int err; - struct mbuf **mrq; - struct mbuf **mbp; +nfs_rephead(int siz, struct nfsrv_descript *nd, struct nfssvc_sock *slp, + int err, struct mbuf **mrq, struct mbuf **mbp) { u_int32_t *tl; struct mbuf *mreq; @@ -1241,10 +1225,7 @@ nfs_timer(void *arg) * This is used for NFSMNT_INT mounts. */ int -nfs_sigintr(nmp, rep, p) - struct nfsmount *nmp; - struct nfsreq *rep; - struct proc *p; +nfs_sigintr(struct nfsmount *nmp, struct nfsreq *rep, struct proc *p) { if (rep && (rep->r_flags & R_SOFTTERM)) @@ -1265,9 +1246,7 @@ nfs_sigintr(nmp, rep, p) * in progress when a reconnect is necessary. */ int -nfs_sndlock(flagp, rep) - int *flagp; - struct nfsreq *rep; +nfs_sndlock(int *flagp, struct nfsreq *rep) { struct proc *p; int slpflag = 0, slptimeo = 0; @@ -1297,8 +1276,7 @@ nfs_sndlock(flagp, rep) * Unlock the stream socket for others. */ void -nfs_sndunlock(flagp) - int *flagp; +nfs_sndunlock(int *flagp) { if ((*flagp & NFSMNT_SNDLOCK) == 0) @@ -1311,8 +1289,7 @@ nfs_sndunlock(flagp) } int -nfs_rcvlock(rep) - struct nfsreq *rep; +nfs_rcvlock(struct nfsreq *rep) { int *flagp = &rep->r_nmp->nm_flag; int slpflag, slptimeo = 0; @@ -1348,8 +1325,7 @@ nfs_rcvlock(rep) * Unlock the stream socket for others. */ void -nfs_rcvunlock(flagp) - int *flagp; +nfs_rcvunlock(int *flagp) { if ((*flagp & NFSMNT_RCVLOCK) == 0) @@ -1454,10 +1430,7 @@ nfs_realign(struct mbuf **pm, int hsiz) * - fill in the cred struct. */ int -nfs_getreq(nd, nfsd, has_header) - struct nfsrv_descript *nd; - struct nfsd *nfsd; - int has_header; +nfs_getreq(struct nfsrv_descript *nd, struct nfsd *nfsd, int has_header) { int len, i; u_int32_t *tl; @@ -1587,10 +1560,7 @@ nfs_msg(struct nfsreq *rep, char *msg) * be called with M_WAIT from an nfsd. */ void -nfsrv_rcv(so, arg, waitflag) - struct socket *so; - caddr_t arg; - int waitflag; +nfsrv_rcv(struct socket *so, caddr_t arg, int waitflag) { struct nfssvc_sock *slp = (struct nfssvc_sock *)arg; struct mbuf *m; @@ -1700,9 +1670,7 @@ dorecs: * can sleep. */ int -nfsrv_getstream(slp, waitflag) - struct nfssvc_sock *slp; - int waitflag; +nfsrv_getstream(struct nfssvc_sock *slp, int waitflag) { struct mbuf *m, **mpp; char *cp1, *cp2; @@ -1821,10 +1789,8 @@ nfsrv_getstream(slp, waitflag) * Parse an RPC header. */ int -nfsrv_dorec(slp, nfsd, ndp) - struct nfssvc_sock *slp; - struct nfsd *nfsd; - struct nfsrv_descript **ndp; +nfsrv_dorec(struct nfssvc_sock *slp, struct nfsd *nfsd, + struct nfsrv_descript **ndp) { struct mbuf *m, *nam; struct nfsrv_descript *nd; diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 43e2b0c4e4a..fc24ce12bad 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.106 2009/09/02 18:20:54 thib Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.107 2009/10/19 22:24:18 jsg Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -515,8 +515,7 @@ struct pool nfsreqpl; * (just used to decide if a cluster is a good idea) */ struct mbuf * -nfsm_reqhead(hsiz) - int hsiz; +nfsm_reqhead(int hsiz) { struct mbuf *mb; @@ -638,11 +637,7 @@ nfsm_rpchead(struct nfsreq *req, struct ucred *cr, int auth_type) * copies mbuf chain to the uio scatter/gather list */ int -nfsm_mbuftouio(mrep, uiop, siz, dpos) - struct mbuf **mrep; - struct uio *uiop; - int siz; - caddr_t *dpos; +nfsm_mbuftouio(struct mbuf **mrep, struct uio *uiop, int siz, caddr_t *dpos) { char *mbufcp, *uiocp; int xfer, left, len; @@ -803,12 +798,7 @@ nfsm_strtombuf(struct mbuf **mp, void *str, size_t len) * cases. (The macros use the vars. dpos and dpos2) */ int -nfsm_disct(mdp, dposp, siz, left, cp2) - struct mbuf **mdp; - caddr_t *dposp; - int siz; - int left; - caddr_t *cp2; +nfsm_disct(struct mbuf **mdp, caddr_t *dposp, int siz, int left, caddr_t *cp2) { struct mbuf *mp, *mp2; int siz2, xfer; @@ -866,11 +856,7 @@ nfsm_disct(mdp, dposp, siz, left, cp2) * Advance the position in the mbuf chain. */ int -nfs_adv(mdp, dposp, offs, left) - struct mbuf **mdp; - caddr_t *dposp; - int offs; - int left; +nfs_adv(struct mbuf **mdp, caddr_t *dposp, int offs, int left) { struct mbuf *m; int s; @@ -893,7 +879,7 @@ nfs_adv(mdp, dposp, offs, left) * Called once to initialize data structures... */ void -nfs_init() +nfs_init(void) { rpc_vers = txdr_unsigned(RPC_VER2); rpc_call = txdr_unsigned(RPC_CALL); @@ -948,11 +934,8 @@ nfs_vfs_init(struct vfsconf *vfsp) * copy the attributes to *vaper */ int -nfs_loadattrcache(vpp, mdp, dposp, vaper) - struct vnode **vpp; - struct mbuf **mdp; - caddr_t *dposp; - struct vattr *vaper; +nfs_loadattrcache(struct vnode **vpp, struct mbuf **mdp, caddr_t *dposp, + struct vattr *vaper) { struct vnode *vp = *vpp; struct vattr *vap; @@ -1126,8 +1109,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) } int -nfs_attrtimeo(np) - struct nfsnode *np; +nfs_attrtimeo(struct nfsnode *np) { struct vnode *vp = np->n_vnode; struct nfsmount *nmp = VFSTONFS(vp->v_mount); @@ -1157,9 +1139,7 @@ nfs_attrtimeo(np) * otherwise return an error */ int -nfs_getattrcache(vp, vaper) - struct vnode *vp; - struct vattr *vaper; +nfs_getattrcache(struct vnode *vp, struct vattr *vaper) { struct nfsnode *np = VTONFS(vp); struct vattr *vap; @@ -1199,16 +1179,9 @@ nfs_getattrcache(vp, vaper) * Set up nameidata for a lookup() call and do it */ int -nfs_namei(ndp, fhp, len, slp, nam, mdp, dposp, retdirp, p) - struct nameidata *ndp; - fhandle_t *fhp; - int len; - struct nfssvc_sock *slp; - struct mbuf *nam; - struct mbuf **mdp; - caddr_t *dposp; - struct vnode **retdirp; - struct proc *p; +nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len, + struct nfssvc_sock *slp, struct mbuf *nam, struct mbuf **mdp, + caddr_t *dposp, struct vnode **retdirp, struct proc *p) { int i, rem; struct mbuf *md; @@ -1314,10 +1287,7 @@ out: * boundary and only trims off the back end */ void -nfsm_adj(mp, len, nul) - struct mbuf *mp; - int len; - int nul; +nfsm_adj(struct mbuf *mp, int len, int nul) { struct mbuf *m; int count, i; @@ -1416,10 +1386,8 @@ nfsm_srvpostop_attr(struct nfsrv_descript *nfsd, int after_ret, } void -nfsm_srvfattr(nfsd, vap, fp) - struct nfsrv_descript *nfsd; - struct vattr *vap; - struct nfs_fattr *fp; +nfsm_srvfattr(struct nfsrv_descript *nfsd, struct vattr *vap, + struct nfs_fattr *fp) { fp->fa_nlink = txdr_unsigned(vap->va_nlink); @@ -1465,14 +1433,9 @@ nfsm_srvfattr(nfsd, vap, fp) * - if not lockflag unlock it with VOP_UNLOCK() */ int -nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp) - fhandle_t *fhp; - int lockflag; - struct vnode **vpp; - struct ucred *cred; - struct nfssvc_sock *slp; - struct mbuf *nam; - int *rdonlyp; +nfsrv_fhtovp(fhandle_t *fhp, int lockflag, struct vnode **vpp, + struct ucred *cred, struct nfssvc_sock *slp, struct mbuf *nam, + int *rdonlyp) { struct proc *p = curproc; /* XXX */ struct mount *mp; @@ -1526,10 +1489,7 @@ nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp) * don't need to be saved to store "struct in_addr", which is only 4 bytes. */ int -netaddr_match(family, haddr, nam) - int family; - union nethostaddr *haddr; - struct mbuf *nam; +netaddr_match(int family, union nethostaddr *haddr, struct mbuf *nam) { struct sockaddr_in *inetaddr; @@ -1553,8 +1513,7 @@ netaddr_match(family, haddr, nam) * flag. Once done the new write verifier can be set for the mount point. */ void -nfs_clearcommit(mp) - struct mount *mp; +nfs_clearcommit(struct mount *mp) { struct vnode *vp, *nvp; struct buf *bp, *nbp; @@ -1577,8 +1536,7 @@ loop: } void -nfs_merge_commit_ranges(vp) - struct vnode *vp; +nfs_merge_commit_ranges(struct vnode *vp) { struct nfsnode *np = VTONFS(vp); @@ -1598,9 +1556,7 @@ nfs_merge_commit_ranges(vp) } int -nfs_in_committed_range(vp, bp) - struct vnode *vp; - struct buf *bp; +nfs_in_committed_range(struct vnode *vp, struct buf *bp) { struct nfsnode *np = VTONFS(vp); off_t lo, hi; @@ -1614,9 +1570,7 @@ nfs_in_committed_range(vp, bp) } int -nfs_in_tobecommitted_range(vp, bp) - struct vnode *vp; - struct buf *bp; +nfs_in_tobecommitted_range(struct vnode *vp, struct buf *bp) { struct nfsnode *np = VTONFS(vp); off_t lo, hi; @@ -1630,9 +1584,7 @@ nfs_in_tobecommitted_range(vp, bp) } void -nfs_add_committed_range(vp, bp) - struct vnode *vp; - struct buf *bp; +nfs_add_committed_range(struct vnode *vp, struct buf *bp) { struct nfsnode *np = VTONFS(vp); off_t lo, hi; @@ -1653,9 +1605,7 @@ nfs_add_committed_range(vp, bp) } void -nfs_del_committed_range(vp, bp) - struct vnode *vp; - struct buf *bp; +nfs_del_committed_range(struct vnode *vp, struct buf *bp) { struct nfsnode *np = VTONFS(vp); off_t lo, hi; @@ -1686,9 +1636,7 @@ nfs_del_committed_range(vp, bp) } void -nfs_add_tobecommitted_range(vp, bp) - struct vnode *vp; - struct buf *bp; +nfs_add_tobecommitted_range(struct vnode *vp, struct buf *bp) { struct nfsnode *np = VTONFS(vp); off_t lo, hi; @@ -1709,9 +1657,7 @@ nfs_add_tobecommitted_range(vp, bp) } void -nfs_del_tobecommitted_range(vp, bp) - struct vnode *vp; - struct buf *bp; +nfs_del_tobecommitted_range(struct vnode *vp, struct buf *bp) { struct nfsnode *np = VTONFS(vp); off_t lo, hi; @@ -1747,9 +1693,7 @@ nfs_del_tobecommitted_range(vp, bp) * numbers not specified for the associated procedure. */ int -nfsrv_errmap(nd, err) - struct nfsrv_descript *nd; - int err; +nfsrv_errmap(struct nfsrv_descript *nd, int err) { short *defaulterrp, *errp; diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c index 9e5aa218ef9..0b9c45ab4d7 100644 --- a/sys/nfs/nfs_syscalls.c +++ b/sys/nfs/nfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_syscalls.c,v 1.87 2009/09/02 18:20:54 thib Exp $ */ +/* $OpenBSD: nfs_syscalls.c,v 1.88 2009/10/19 22:24:18 jsg Exp $ */ /* $NetBSD: nfs_syscalls.c,v 1.19 1996/02/18 11:53:52 fvdl Exp $ */ /* @@ -214,9 +214,7 @@ sys_nfssvc(struct proc *p, void *v, register_t *retval) * Adds a socket to the list for servicing by nfsds. */ int -nfssvc_addsock(fp, mynam) - struct file *fp; - struct mbuf *mynam; +nfssvc_addsock(struct file *fp, struct mbuf *mynam) { struct mbuf *m; int siz; @@ -471,8 +469,7 @@ done: * reassigned during cleanup. */ void -nfsrv_zapsock(slp) - struct nfssvc_sock *slp; +nfsrv_zapsock(struct nfssvc_sock *slp) { struct socket *so; struct file *fp; @@ -504,8 +501,7 @@ nfsrv_zapsock(slp) * is no longer valid, you can throw it away. */ void -nfsrv_slpderef(slp) - struct nfssvc_sock *slp; +nfsrv_slpderef(struct nfssvc_sock *slp) { if (--(slp->ns_sref) == 0 && (slp->ns_flag & SLP_VALID) == 0) { TAILQ_REMOVE(&nfssvc_sockhead, slp, ns_chain); @@ -519,8 +515,7 @@ nfsrv_slpderef(slp) * corruption. */ void -nfsrv_init(terminating) - int terminating; +nfsrv_init(int terminating) { struct nfssvc_sock *slp, *nslp; @@ -651,8 +646,7 @@ nfssvc_iod(void *arg) } void -nfs_getset_niothreads(set) - int set; +nfs_getset_niothreads(int set) { struct proc *p; int i, have, start; diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index 5c570f1efb8..c02a4f5d5a4 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vfsops.c,v 1.91 2009/09/02 18:20:54 thib Exp $ */ +/* $OpenBSD: nfs_vfsops.c,v 1.92 2009/10/19 22:24:18 jsg Exp $ */ /* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */ /* @@ -98,10 +98,7 @@ const struct vfsops nfs_vfsops = { * nfs statfs call */ int -nfs_statfs(mp, sbp, p) - struct mount *mp; - struct statfs *sbp; - struct proc *p; +nfs_statfs(struct mount *mp, struct statfs *sbp, struct proc *p) { struct vnode *vp; struct nfs_statfs *sfp = NULL; @@ -176,11 +173,8 @@ nfsmout: * nfs version 3 fsinfo rpc call */ int -nfs_fsinfo(nmp, vp, cred, p) - struct nfsmount *nmp; - struct vnode *vp; - struct ucred *cred; - struct proc *p; +nfs_fsinfo(struct nfsmount *nmp, struct vnode *vp, struct ucred *cred, + struct proc *p) { struct nfsv3_fsinfo *fsp; struct nfsm_info info; @@ -249,7 +243,7 @@ nfsmout: * - build the rootfs mount point and call mountnfs() to do the rest. */ int -nfs_mountroot() +nfs_mountroot(void) { struct nfs_diskless nd; struct vattr attr; @@ -370,10 +364,7 @@ nfs_mountroot() * Internal version of mount system call for diskless setup. */ struct mount * -nfs_mount_diskless(ndmntp, mntname, mntflag) - struct nfs_dlmount *ndmntp; - char *mntname; - int mntflag; +nfs_mount_diskless(struct nfs_dlmount *ndmntp, char *mntname, int mntflag) { struct nfs_args args; struct mount *mp; @@ -420,10 +411,8 @@ nfs_mount_diskless(ndmntp, mntname, mntflag) } void -nfs_decode_args(nmp, argp, nargp) - struct nfsmount *nmp; - struct nfs_args *argp; - struct nfs_args *nargp; +nfs_decode_args(struct nfsmount *nmp, struct nfs_args *argp, + struct nfs_args *nargp) { int s; int adjsock = 0; @@ -577,12 +566,8 @@ nfs_decode_args(nmp, argp, nargp) */ /* ARGSUSED */ int -nfs_mount(mp, path, data, ndp, p) - struct mount *mp; - const char *path; - void *data; - struct nameidata *ndp; - struct proc *p; +nfs_mount(struct mount *mp, const char *path, void *data, + struct nameidata *ndp, struct proc *p) { int error; struct nfs_args args; @@ -656,11 +641,8 @@ nfs_mount(mp, path, data, ndp, p) * Common code for mount and mountroot */ int -mountnfs(argp, mp, nam, pth, hst) - struct nfs_args *argp; - struct mount *mp; - struct mbuf *nam; - char *pth, *hst; +mountnfs(struct nfs_args *argp, struct mount *mp, struct mbuf *nam, char *pth, + char *hst) { struct nfsmount *nmp; int error; @@ -758,9 +740,7 @@ nfs_unmount(struct mount *mp, int mntflags, struct proc *p) * Return root of a filesystem */ int -nfs_root(mp, vpp) - struct mount *mp; - struct vnode **vpp; +nfs_root(struct mount *mp, struct vnode **vpp) { struct nfsmount *nmp; struct nfsnode *np; @@ -778,11 +758,7 @@ nfs_root(mp, vpp) * Flush out the buffer cache */ int -nfs_sync(mp, waitfor, cred, p) - struct mount *mp; - int waitfor; - struct ucred *cred; - struct proc *p; +nfs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct proc *p) { struct vnode *vp; int error, allerror = 0; @@ -823,10 +799,7 @@ loop: */ /* ARGSUSED */ int -nfs_vget(mp, ino, vpp) - struct mount *mp; - ino_t ino; - struct vnode **vpp; +nfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) { return (EOPNOTSUPP); @@ -837,7 +810,7 @@ nfs_vget(mp, ino, vpp) */ int nfs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, - size_t newlen, struct proc *p) + size_t newlen, struct proc *p) { int rv; @@ -890,10 +863,7 @@ nfs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, */ /* ARGSUSED */ int -nfs_fhtovp(mp, fhp, vpp) - struct mount *mp; - struct fid *fhp; - struct vnode **vpp; +nfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) { return (EINVAL); @@ -904,9 +874,7 @@ nfs_fhtovp(mp, fhp, vpp) */ /* ARGSUSED */ int -nfs_vptofh(vp, fhp) - struct vnode *vp; - struct fid *fhp; +nfs_vptofh(struct vnode *vp, struct fid *fhp) { return (EINVAL); @@ -917,10 +885,7 @@ nfs_vptofh(vp, fhp) */ /* ARGSUSED */ int -nfs_start(mp, flags, p) - struct mount *mp; - int flags; - struct proc *p; +nfs_start(struct mount *mp, int flags, struct proc *p) { return (0); @@ -931,12 +896,7 @@ nfs_start(mp, flags, p) */ /* ARGSUSED */ int -nfs_quotactl(mp, cmd, uid, arg, p) - struct mount *mp; - int cmd; - uid_t uid; - caddr_t arg; - struct proc *p; +nfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg, struct proc *p) { return (EOPNOTSUPP); @@ -947,11 +907,8 @@ nfs_quotactl(mp, cmd, uid, arg, p) */ /* ARGUSED */ int -nfs_checkexp(mp, nam, exflagsp, credanonp) - struct mount *mp; - struct mbuf *nam; - int *exflagsp; - struct ucred **credanonp; +nfs_checkexp(struct mount *mp, struct mbuf *nam, int *exflagsp, + struct ucred **credanonp) { return (EOPNOTSUPP); } diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 4e32e84259b..df831ceaacc 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.124 2009/09/02 18:20:54 thib Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.125 2009/10/19 22:24:18 jsg Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -208,10 +208,7 @@ nfs_cache_enter(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) * nfs null call from vfs. */ int -nfs_null(vp, cred, procp) - struct vnode *vp; - struct ucred *cred; - struct proc *procp; +nfs_null(struct vnode *vp, struct ucred *cred, struct proc *procp) { struct nfsm_info info; int error = 0; @@ -229,8 +226,7 @@ nfs_null(vp, cred, procp) * are changed on the server, accesses might still fail later. */ int -nfs_access(v) - void *v; +nfs_access(void *v) { struct vop_access_args *ap = v; struct vnode *vp = ap->a_vp; @@ -365,8 +361,7 @@ nfsmout: * if consistency is lost. */ int -nfs_open(v) - void *v; +nfs_open(void *v) { struct vop_open_args *ap = v; struct vnode *vp = ap->a_vp; @@ -460,8 +455,7 @@ nfs_open(v) * commit is necessary now. */ int -nfs_close(v) - void *v; +nfs_close(void *v) { struct vop_close_args *ap = v; struct vnode *vp = ap->a_vp; @@ -489,8 +483,7 @@ nfs_close(v) * nfs getattr call from vfs. */ int -nfs_getattr(v) - void *v; +nfs_getattr(void *v) { struct vop_getattr_args *ap = v; struct vnode *vp = ap->a_vp; @@ -529,8 +522,7 @@ nfsmout: * nfs setattr call. */ int -nfs_setattr(v) - void *v; +nfs_setattr(void *v) { struct vop_setattr_args *ap = v; struct vnode *vp = ap->a_vp; @@ -613,11 +605,8 @@ nfs_setattr(v) * Do an nfs setattr rpc. */ int -nfs_setattrrpc(vp, vap, cred, procp) - struct vnode *vp; - struct vattr *vap; - struct ucred *cred; - struct proc *procp; +nfs_setattrrpc(struct vnode *vp, struct vattr *vap, struct ucred *cred, + struct proc *procp) { struct nfsv2_sattr *sp; struct nfsm_info info; @@ -676,8 +665,7 @@ nfsmout: * If not found, unlock the directory nfsnode and do the rpc */ int -nfs_lookup(v) - void *v; +nfs_lookup(void *v) { struct vop_lookup_args *ap = v; struct componentname *cnp = ap->a_cnp; @@ -939,8 +927,7 @@ nfsmout: * Just call nfs_bioread() to do the work. */ int -nfs_read(v) - void *v; +nfs_read(void *v) { struct vop_read_args *ap = v; struct vnode *vp = ap->a_vp; @@ -954,8 +941,7 @@ nfs_read(v) * nfs readlink call */ int -nfs_readlink(v) - void *v; +nfs_readlink(void *v) { struct vop_readlink_args *ap = v; struct vnode *vp = ap->a_vp; @@ -970,10 +956,7 @@ nfs_readlink(v) * Called by nfs_doio() from below the buffer cache. */ int -nfs_readlinkrpc(vp, uiop, cred) - struct vnode *vp; - struct uio *uiop; - struct ucred *cred; +nfs_readlinkrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred) { struct nfsm_info info; u_int32_t *tl; @@ -1009,9 +992,7 @@ nfsmout: * Ditto above */ int -nfs_readrpc(vp, uiop) - struct vnode *vp; - struct uio *uiop; +nfs_readrpc(struct vnode *vp, struct uio *uiop) { struct nfsm_info info; u_int32_t *tl; @@ -1080,10 +1061,7 @@ nfsmout: * nfs write call */ int -nfs_writerpc(vp, uiop, iomode, must_commit) - struct vnode *vp; - struct uio *uiop; - int *iomode, *must_commit; +nfs_writerpc(struct vnode *vp, struct uio *uiop, int *iomode, int *must_commit) { struct nfsm_info info; u_int32_t *tl; @@ -1204,11 +1182,8 @@ nfsmout: * mode set to specify the file type and the size field for rdev. */ int -nfs_mknodrpc(dvp, vpp, cnp, vap) - struct vnode *dvp; - struct vnode **vpp; - struct componentname *cnp; - struct vattr *vap; +nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, + struct vattr *vap) { struct nfsv2_sattr *sp; struct nfsm_info info; @@ -1299,8 +1274,7 @@ nfsmout: * just call nfs_mknodrpc() to do the work. */ int -nfs_mknod(v) - void *v; +nfs_mknod(void *v) { struct vop_mknod_args *ap = v; struct vnode *newvp; @@ -1316,8 +1290,7 @@ nfs_mknod(v) } int -nfs_create(v) - void *v; +nfs_create(void *v) { struct vop_create_args *ap = v; struct vnode *dvp = ap->a_dvp; @@ -1427,8 +1400,7 @@ nfsmout: * do the remove rpc */ int -nfs_remove(v) - void *v; +nfs_remove(void *v) { struct vop_remove_args *ap = v; struct vnode *vp = ap->a_vp; @@ -1491,8 +1463,7 @@ nfs_remove(v) * nfs file remove rpc called from nfs_inactive */ int -nfs_removeit(sp) - struct sillyrename *sp; +nfs_removeit(struct sillyrename *sp) { return (nfs_removerpc(sp->s_dvp, sp->s_name, sp->s_namlen, sp->s_cred, @@ -1503,12 +1474,8 @@ nfs_removeit(sp) * Nfs remove rpc, called from nfs_remove() and nfs_removeit(). */ int -nfs_removerpc(dvp, name, namelen, cred, proc) - struct vnode *dvp; - char *name; - int namelen; - struct ucred *cred; - struct proc *proc; +nfs_removerpc(struct vnode *dvp, char *name, int namelen, struct ucred *cred, + struct proc *proc) { struct nfsm_info info; u_int32_t *tl; @@ -1542,8 +1509,7 @@ nfsmout: * nfs file rename call */ int -nfs_rename(v) - void *v; +nfs_rename(void *v) { struct vop_rename_args *ap = v; struct vnode *fvp = ap->a_fvp; @@ -1610,10 +1576,8 @@ out: * nfs file rename rpc called from nfs_remove() above */ int -nfs_renameit(sdvp, scnp, sp) - struct vnode *sdvp; - struct componentname *scnp; - struct sillyrename *sp; +nfs_renameit(struct vnode *sdvp, struct componentname *scnp, + struct sillyrename *sp) { return (nfs_renamerpc(sdvp, scnp->cn_nameptr, scnp->cn_namelen, sdvp, sp->s_name, sp->s_namlen, scnp->cn_cred, scnp->cn_proc)); @@ -1623,15 +1587,9 @@ nfs_renameit(sdvp, scnp, sp) * Do an nfs rename rpc. Called from nfs_rename() and nfs_renameit(). */ int -nfs_renamerpc(fdvp, fnameptr, fnamelen, tdvp, tnameptr, tnamelen, cred, proc) - struct vnode *fdvp; - char *fnameptr; - int fnamelen; - struct vnode *tdvp; - char *tnameptr; - int tnamelen; - struct ucred *cred; - struct proc *proc; +nfs_renamerpc(struct vnode *fdvp, char *fnameptr, int fnamelen, + struct vnode *tdvp, char *tnameptr, int tnamelen, struct ucred *cred, + struct proc *proc) { struct nfsm_info info; u_int32_t *tl; @@ -1672,8 +1630,7 @@ nfsmout: * nfs hard link create call */ int -nfs_link(v) - void *v; +nfs_link(void *v) { struct vop_link_args *ap = v; struct vnode *vp = ap->a_vp; @@ -1736,8 +1693,7 @@ nfsmout: * nfs symbolic link create call */ int -nfs_symlink(v) - void *v; +nfs_symlink(void *v) { struct vop_symlink_args *ap = v; struct vnode *dvp = ap->a_dvp; @@ -1799,8 +1755,7 @@ nfsmout: * nfs make dir call */ int -nfs_mkdir(v) - void *v; +nfs_mkdir(void *v) { struct vop_mkdir_args *ap = v; struct vnode *dvp = ap->a_dvp; @@ -1879,8 +1834,7 @@ nfsmout: * nfs remove directory call */ int -nfs_rmdir(v) - void *v; +nfs_rmdir(void *v) { struct vop_rmdir_args *ap = v; struct vnode *vp = ap->a_vp; @@ -1959,8 +1913,7 @@ struct nfs_dirent { * nfs readdir call */ int -nfs_readdir(v) - void *v; +nfs_readdir(void *v) { struct vop_readdir_args *ap = v; struct vnode *vp = ap->a_vp; @@ -2107,9 +2060,7 @@ nfs_readdir(v) * Readdir rpc call. */ int -nfs_readdirrpc(struct vnode *vp, - struct uio *uiop, - struct ucred *cred, +nfs_readdirrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, int *end_of_directory) { int len, left; @@ -2538,9 +2489,7 @@ nfsmout: * nfs_rename() completes, but... */ int -nfs_sillyrename(dvp, vp, cnp) - struct vnode *dvp, *vp; - struct componentname *cnp; +nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) { struct sillyrename *sp; struct nfsnode *np; @@ -2599,13 +2548,8 @@ bad: * *npp != NULL --> update the file handle in the vnode */ int -nfs_lookitup(dvp, name, len, cred, procp, npp) - struct vnode *dvp; - char *name; - int len; - struct ucred *cred; - struct proc *procp; - struct nfsnode **npp; +nfs_lookitup(struct vnode *dvp, char *name, int len, struct ucred *cred, + struct proc *procp, struct nfsnode **npp) { struct nfsm_info info; u_int32_t *tl; @@ -2678,11 +2622,7 @@ nfsmout: * Nfs Version 3 commit rpc */ int -nfs_commit(vp, offset, cnt, procp) - struct vnode *vp; - u_quad_t offset; - int cnt; - struct proc *procp; +nfs_commit(struct vnode *vp, u_quad_t offset, int cnt, struct proc *procp) { struct nfsm_info info; u_int32_t *tl; @@ -2732,8 +2672,7 @@ nfsmout: * context of the swapper process (2). */ int -nfs_bmap(v) - void *v; +nfs_bmap(void *v) { struct vop_bmap_args *ap = v; struct vnode *vp = ap->a_vp; @@ -2752,8 +2691,7 @@ nfs_bmap(v) * request. */ int -nfs_strategy(v) - void *v; +nfs_strategy(void *v) { struct vop_strategy_args *ap = v; struct buf *bp = ap->a_bp; @@ -2780,8 +2718,7 @@ nfs_strategy(v) * fsync vnode op. Just call nfs_flush() with commit == 1. */ int -nfs_fsync(v) - void *v; +nfs_fsync(void *v) { struct vop_fsync_args *ap = v; @@ -2794,12 +2731,8 @@ nfs_fsync(v) * associated with the vnode. */ int -nfs_flush(vp, cred, waitfor, p, commit) - struct vnode *vp; - struct ucred *cred; - int waitfor; - struct proc *p; - int commit; +nfs_flush(struct vnode *vp, struct ucred *cred, int waitfor, struct proc *p, + int commit) { struct nfsnode *np = VTONFS(vp); struct buf *bp; @@ -2968,8 +2901,7 @@ loop: */ /* ARGSUSED */ int -nfs_pathconf(v) - void *v; +nfs_pathconf(void *v) { #if 0 struct vop_pathconf_args *ap = v; @@ -2982,8 +2914,7 @@ nfs_pathconf(v) * NFS advisory byte-level locks. */ int -nfs_advlock(v) - void *v; +nfs_advlock(void *v) { struct vop_advlock_args *ap = v; struct nfsnode *np = VTONFS(ap->a_vp); @@ -2996,8 +2927,7 @@ nfs_advlock(v) * Print out the contents of an nfsnode. */ int -nfs_print(v) - void *v; +nfs_print(void *v) { struct vop_print_args *ap = v; struct vnode *vp = ap->a_vp; @@ -3017,8 +2947,7 @@ nfs_print(v) * Just call nfs_writebp() with the force argument set to 1. */ int -nfs_bwrite(v) - void *v; +nfs_bwrite(void *v) { struct vop_bwrite_args *ap = v; @@ -3030,9 +2959,7 @@ nfs_bwrite(v) * the force flag is one and it also handles the B_NEEDCOMMIT flag. */ int -nfs_writebp(bp, force) - struct buf *bp; - int force; +nfs_writebp(struct buf *bp, int force) { int oldflags = bp->b_flags, retv = 1; struct proc *p = curproc; /* XXX */ @@ -3141,8 +3068,7 @@ nfs_writebp(bp, force) * local to the client. */ int -nfsspec_access(v) - void *v; +nfsspec_access(void *v) { struct vop_access_args *ap = v; struct vattr va; @@ -3174,8 +3100,7 @@ nfsspec_access(v) } int -nfs_poll(v) - void *v; +nfs_poll(void *v) { struct vop_poll_args *ap = v; @@ -3189,8 +3114,7 @@ nfs_poll(v) * Read wrapper for special devices. */ int -nfsspec_read(v) - void *v; +nfsspec_read(void *v) { struct vop_read_args *ap = v; struct nfsnode *np = VTONFS(ap->a_vp); @@ -3207,8 +3131,7 @@ nfsspec_read(v) * Write wrapper for special devices. */ int -nfsspec_write(v) - void *v; +nfsspec_write(void *v) { struct vop_write_args *ap = v; struct nfsnode *np = VTONFS(ap->a_vp); @@ -3227,8 +3150,7 @@ nfsspec_write(v) * Update the times on the nfsnode then do device close. */ int -nfsspec_close(v) - void *v; +nfsspec_close(void *v) { struct vop_close_args *ap = v; struct vnode *vp = ap->a_vp; @@ -3255,8 +3177,7 @@ nfsspec_close(v) * Read wrapper for fifos. */ int -nfsfifo_read(v) - void *v; +nfsfifo_read(void *v) { struct vop_read_args *ap = v; extern int (**fifo_vnodeop_p)(void *); @@ -3274,8 +3195,7 @@ nfsfifo_read(v) * Write wrapper for fifos. */ int -nfsfifo_write(v) - void *v; +nfsfifo_write(void *v) { struct vop_write_args *ap = v; extern int (**fifo_vnodeop_p)(void *); @@ -3295,8 +3215,7 @@ nfsfifo_write(v) * Update the times on the nfsnode then do fifo close. */ int -nfsfifo_close(v) - void *v; +nfsfifo_close(void *v) { struct vop_close_args *ap = v; struct vnode *vp = ap->a_vp; |