diff options
Diffstat (limited to 'sys/nfs/nfs_subs.c')
-rw-r--r-- | sys/nfs/nfs_subs.c | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 15dded43510..c317cb7781d 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.39 2002/01/11 01:20:56 nate Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.40 2002/01/16 21:51:16 ericj Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -552,8 +552,8 @@ nfsm_reqh(vp, procid, hsiz, bposp) int hsiz; caddr_t *bposp; { - register struct mbuf *mb; - register caddr_t bpos; + struct mbuf *mb; + caddr_t bpos; MGET(mb, M_WAIT, MT_DATA); if (hsiz >= MINCLSIZE) @@ -575,7 +575,7 @@ nfsm_reqh(vp, procid, hsiz, bposp) struct mbuf * nfsm_rpchead(cr, nmflag, procid, auth_type, auth_len, auth_str, verf_len, verf_str, mrest, mrest_len, mbp, xidp) - register struct ucred *cr; + struct ucred *cr; int nmflag; int procid; int auth_type; @@ -588,10 +588,10 @@ nfsm_rpchead(cr, nmflag, procid, auth_type, auth_len, auth_str, verf_len, struct mbuf **mbp; u_int32_t *xidp; { - register struct mbuf *mb; - register u_int32_t *tl; - register caddr_t bpos; - register int i; + struct mbuf *mb; + u_int32_t *tl; + caddr_t bpos; + int i; struct mbuf *mreq, *mb2; int siz, grpsiz, authsiz; @@ -728,13 +728,13 @@ nfsm_rpchead(cr, nmflag, procid, auth_type, auth_len, auth_str, verf_len, int nfsm_mbuftouio(mrep, uiop, siz, dpos) struct mbuf **mrep; - register struct uio *uiop; + struct uio *uiop; int siz; caddr_t *dpos; { - register char *mbufcp, *uiocp; - register int xfer, left, len; - register struct mbuf *mp; + char *mbufcp, *uiocp; + int xfer, left, len; + struct mbuf *mp; long uiosiz, rem; int error = 0; @@ -803,14 +803,14 @@ nfsm_mbuftouio(mrep, uiop, siz, dpos) */ int nfsm_uiotombuf(uiop, mq, siz, bpos) - register struct uio *uiop; + struct uio *uiop; struct mbuf **mq; int siz; caddr_t *bpos; { - register char *uiocp; - register struct mbuf *mp, *mp2; - register int xfer, left, mlen; + char *uiocp; + struct mbuf *mp, *mp2; + int xfer, left, mlen; int uiosiz, clflg, rem; char *cp; @@ -895,9 +895,9 @@ nfsm_disct(mdp, dposp, siz, left, cp2) int left; caddr_t *cp2; { - register struct mbuf *mp, *mp2; - register int siz2, xfer; - register caddr_t p; + struct mbuf *mp, *mp2; + int siz2, xfer; + caddr_t p; mp = *mdp; while (left == 0) { @@ -957,8 +957,8 @@ nfs_adv(mdp, dposp, offs, left) int offs; int left; { - register struct mbuf *m; - register int s; + struct mbuf *m; + int s; m = *mdp; s = left; @@ -984,7 +984,7 @@ nfsm_strtmbuf(mb, bpos, cp, siz) char *cp; long siz; { - register struct mbuf *m1 = NULL, *m2; + struct mbuf *m1 = NULL, *m2; long left, xfer, len, tlen; u_int32_t *tl; int putsize; @@ -1084,7 +1084,7 @@ int nfs_vfs_init(vfsp) struct vfsconf *vfsp; { - register int i; + int i; /* Ensure async daemons disabled */ for (i = 0; i < NFS_MAXASYNCDAEMON; i++) @@ -1116,12 +1116,12 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper) caddr_t *dposp; struct vattr *vaper; { - register struct vnode *vp = *vpp; - register struct vattr *vap; - register struct nfs_fattr *fp; + struct vnode *vp = *vpp; + struct vattr *vap; + struct nfs_fattr *fp; extern int (**spec_nfsv2nodeop_p) __P((void *)); - register struct nfsnode *np; - register int32_t t1; + struct nfsnode *np; + int32_t t1; caddr_t cp2; int error = 0; int32_t rdev; @@ -1299,11 +1299,11 @@ nfs_attrtimeo (np) */ int nfs_getattrcache(vp, vaper) - register struct vnode *vp; + struct vnode *vp; struct vattr *vaper; { - register struct nfsnode *np = VTONFS(vp); - register struct vattr *vap; + struct nfsnode *np = VTONFS(vp); + struct vattr *vap; if ((time.tv_sec - np->n_attrstamp) >= nfs_attrtimeo(np)) { nfsstats.attrcache_misses++; @@ -1340,7 +1340,7 @@ nfs_getattrcache(vp, vaper) */ int nfs_namei(ndp, fhp, len, slp, nam, mdp, dposp, retdirp, p, kerbflag) - register struct nameidata *ndp; + struct nameidata *ndp; fhandle_t *fhp; int len; struct nfssvc_sock *slp; @@ -1351,9 +1351,9 @@ nfs_namei(ndp, fhp, len, slp, nam, mdp, dposp, retdirp, p, kerbflag) struct proc *p; int kerbflag; { - register int i, rem; - register struct mbuf *md; - register char *fromcp, *tocp; + int i, rem; + struct mbuf *md; + char *fromcp, *tocp; struct vnode *dp; int error, rdonly; struct componentname *cnp = &ndp->ni_cnd; @@ -1457,12 +1457,12 @@ out: void nfsm_adj(mp, len, nul) struct mbuf *mp; - register int len; + int len; int nul; { - register struct mbuf *m; - register int count, i; - register char *cp; + struct mbuf *m; + int count, i; + char *cp; /* * Trim from tail. Scan the mbuf chain, @@ -1520,15 +1520,15 @@ void nfsm_srvwcc(nfsd, before_ret, before_vap, after_ret, after_vap, mbp, bposp) struct nfsrv_descript *nfsd; int before_ret; - register struct vattr *before_vap; + struct vattr *before_vap; int after_ret; struct vattr *after_vap; struct mbuf **mbp; char **bposp; { - register struct mbuf *mb = *mbp, *mb2; - register char *bpos = *bposp; - register u_int32_t *tl; + struct mbuf *mb = *mbp, *mb2; + char *bpos = *bposp; + u_int32_t *tl; if (before_ret) { nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED); @@ -1555,10 +1555,10 @@ nfsm_srvpostopattr(nfsd, after_ret, after_vap, mbp, bposp) struct mbuf **mbp; char **bposp; { - register struct mbuf *mb = *mbp, *mb2; - register char *bpos = *bposp; - register u_int32_t *tl; - register struct nfs_fattr *fp; + struct mbuf *mb = *mbp, *mb2; + char *bpos = *bposp; + u_int32_t *tl; + struct nfs_fattr *fp; if (after_ret) { nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED); @@ -1575,9 +1575,9 @@ nfsm_srvpostopattr(nfsd, after_ret, after_vap, mbp, bposp) void nfsm_srvfattr(nfsd, vap, fp) - register struct nfsrv_descript *nfsd; - register struct vattr *vap; - register struct nfs_fattr *fp; + struct nfsrv_descript *nfsd; + struct vattr *vap; + struct nfs_fattr *fp; { fp->fa_nlink = txdr_unsigned(vap->va_nlink); @@ -1634,8 +1634,8 @@ nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp, kerbflag) int kerbflag; { struct proc *p = curproc; /* XXX */ - register struct mount *mp; - register int i; + struct mount *mp; + int i; struct ucred *credanon; int error, exflags; struct sockaddr_in *saddr; @@ -1701,7 +1701,7 @@ netaddr_match(family, haddr, nam) union nethostaddr *haddr; struct mbuf *nam; { - register struct sockaddr_in *inetaddr; + struct sockaddr_in *inetaddr; switch (family) { case AF_INET: @@ -1713,7 +1713,7 @@ netaddr_match(family, haddr, nam) #ifdef ISO case AF_ISO: { - register struct sockaddr_iso *isoaddr1, *isoaddr2; + struct sockaddr_iso *isoaddr1, *isoaddr2; isoaddr1 = mtod(nam, struct sockaddr_iso *); isoaddr2 = mtod(haddr->had_nam, struct sockaddr_iso *); @@ -1741,18 +1741,18 @@ void nfs_clearcommit(mp) struct mount *mp; { - register struct vnode *vp, *nvp; - register struct buf *bp, *nbp; + struct vnode *vp, *nvp; + struct buf *bp, *nbp; int s; s = splbio(); loop: - for (vp = mp->mnt_vnodelist.lh_first; vp; vp = nvp) { + for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULL; vp = nvp) { if (vp->v_mount != mp) /* Paranoia */ goto loop; - nvp = vp->v_mntvnodes.le_next; - for (bp = vp->v_dirtyblkhd.lh_first; bp; bp = nbp) { - nbp = bp->b_vnbufs.le_next; + nvp = LIST_NEXT(vp, v_mntvnodes); + for (bp = LIST_FIRST(&vp->v_dirtyblkhd); bp != NULL; bp = nbp) { + nbp = LIST_NEXT(bp, b_vnbufs); if ((bp->b_flags & (B_BUSY | B_DELWRI | B_NEEDCOMMIT)) == (B_DELWRI | B_NEEDCOMMIT)) bp->b_flags &= ~B_NEEDCOMMIT; @@ -1768,9 +1768,9 @@ loop: int nfsrv_errmap(nd, err) struct nfsrv_descript *nd; - register int err; + int err; { - register short *defaulterrp, *errp; + short *defaulterrp, *errp; if (nd->nd_flag & ND_NFSV3) { if (nd->nd_procnum <= NFSPROC_COMMIT) { @@ -1797,10 +1797,10 @@ nfsrv_errmap(nd, err) */ void nfsrvw_sort(list, num) - register gid_t *list; - register int num; + gid_t *list; + int num; { - register int i, j; + int i, j; gid_t v; /* Insertion sort. */ @@ -1818,9 +1818,9 @@ nfsrvw_sort(list, num) */ void nfsrv_setcred(incred, outcred) - register struct ucred *incred, *outcred; + struct ucred *incred, *outcred; { - register int i; + int i; bzero((caddr_t)outcred, sizeof (struct ucred)); outcred->cr_ref = 1; |