diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2008-06-14 22:44:08 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2008-06-14 22:44:08 +0000 |
commit | 892e5c7870feb83aed885e2d125fc87cdf442596 (patch) | |
tree | 15970249e962c624f72bc0bfbbe4200d863e290b /sys/nfs/nfsm_subs.h | |
parent | e2b77923703616711f56e18d99911219a9c0f185 (diff) |
Replace nfsm_build/bcopy with nfsm_{buf,str}tombuf functions in
filehandle -> mbuf write macros.
Removes `magic' variable cp which was used only in these macros,
and should lead to marginally better mbuf packing as well.
`slap it in' thib@
Diffstat (limited to 'sys/nfs/nfsm_subs.h')
-rw-r--r-- | sys/nfs/nfsm_subs.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/nfs/nfsm_subs.h b/sys/nfs/nfsm_subs.h index 43d29ac281e..c2aa61b97e6 100644 --- a/sys/nfs/nfsm_subs.h +++ b/sys/nfs/nfsm_subs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsm_subs.h,v 1.29 2008/06/13 22:11:32 blambert Exp $ */ +/* $OpenBSD: nfsm_subs.h,v 1.30 2008/06/14 22:44:07 blambert Exp $ */ /* $NetBSD: nfsm_subs.h,v 1.10 1996/03/20 21:59:56 fvdl Exp $ */ /* @@ -86,18 +86,14 @@ nfsm_strtombuf(&mb, VTONFS(v)->n_fhp, \ VTONFS(v)->n_fhsize); \ } else { \ - cp = nfsm_build(&mb, NFSX_V2FH); \ - bcopy((caddr_t)VTONFS(v)->n_fhp, cp, NFSX_V2FH); \ + nfsm_buftombuf(&mb, VTONFS(v)->n_fhp, NFSX_V2FH); \ } } #define nfsm_srvfhtom(f, v3) \ { if (v3) { \ - tl = nfsm_build(&mb, NFSX_UNSIGNED + NFSX_V3FH); \ - *tl++ = txdr_unsigned(NFSX_V3FH); \ - bcopy((caddr_t)(f), (caddr_t)tl, NFSX_V3FH); \ + nfsm_strtombuf(&mb, (f), NFSX_V3FH); \ } else { \ - cp = nfsm_build(&mb, NFSX_V2FH); \ - bcopy((caddr_t)(f), cp, NFSX_V2FH); \ + nfsm_buftombuf(&mb, (f), NFSX_V2FH); \ } } #define nfsm_srvpostop_fh(f) \ |