diff options
author | dfr <dfr@FreeBSD.org> | 1997-07-16 09:06:30 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1997-07-16 09:06:30 +0000 |
commit | b627718fbd9e30033d07c3277899ab4726ac6b9b (patch) | |
tree | 8e1ab5384b1f019ad8b612a3fc1d51416baf1acd /sys/nfsclient/nfsm_subs.h | |
parent | 9b1c747b1bcc658b6cafea5e03c5c0f0b4cbb74f (diff) | |
download | FreeBSD-src-b627718fbd9e30033d07c3277899ab4726ac6b9b.zip FreeBSD-src-b627718fbd9e30033d07c3277899ab4726ac6b9b.tar.gz |
Merge WebNFS changes from NetBSD.
Obtained from: NetBSD
Diffstat (limited to 'sys/nfsclient/nfsm_subs.h')
-rw-r--r-- | sys/nfsclient/nfsm_subs.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sys/nfsclient/nfsm_subs.h b/sys/nfsclient/nfsm_subs.h index c2677c8..e33be82 100644 --- a/sys/nfsclient/nfsm_subs.h +++ b/sys/nfsclient/nfsm_subs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfsm_subs.h 8.2 (Berkeley) 3/30/95 - * $Id$ + * $Id: nfsm_subs.h,v 1.12 1997/02/22 09:42:48 peter Exp $ */ @@ -363,18 +363,24 @@ struct mbuf *nfsm_rpchead __P((struct ucred *cr, int nmflag, int procid, } } #define nfsm_srvmtofh(f) \ - { if (nfsd->nd_flag & ND_NFSV3) { \ + { int fhlen = NFSX_V3FH; \ + if (nfsd->nd_flag & ND_NFSV3) { \ nfsm_dissect(tl, u_long *, NFSX_UNSIGNED); \ - if (fxdr_unsigned(int, *tl) != NFSX_V3FH) { \ + fhlen = fxdr_unsigned(int, *tl); \ + if (fhlen == 0) { \ + bzero((caddr_t)(f), NFSX_V3FH); \ + } else if (fhlen != NFSX_V3FH) { \ error = EBADRPC; \ nfsm_reply(0); \ } \ } \ - nfsm_dissect(tl, u_long *, NFSX_V3FH); \ - bcopy((caddr_t)tl, (caddr_t)(f), NFSX_V3FH); \ - if ((nfsd->nd_flag & ND_NFSV3) == 0) \ - nfsm_adv(NFSX_V2FH - NFSX_V3FH); \ - } + if (fhlen != 0) { \ + nfsm_dissect(tl, u_long *, NFSX_V3FH); \ + bcopy((caddr_t)tl, (caddr_t)(f), NFSX_V3FH); \ + if ((nfsd->nd_flag & ND_NFSV3) == 0) \ + nfsm_adv(NFSX_V2FH - NFSX_V3FH); \ + } \ + } #define nfsm_clget \ if (bp >= be) { \ |