Date: Mon, 2 Aug 1999 16:18:48 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Dag-Erling Smorgrav <des@yes.no>, Alfred Perlstein <bright@rush.net>, Doug <Doug@gorean.org>, freebsd-hackers@FreeBSD.ORG Subject: Re: readdirplus is very cool, any other nfs client suggestions? Message-ID: <199908022318.QAA16171@apollo.backplane.com> References: <Pine.BSF.3.96.990730203954.20420W-100000@cygnus.rush.net> <xzpbtcq8wzj.fsf@des.follo.net> <199908021455.HAA13149@apollo.backplane.com> <xzpyafup5es.fsf@des.follo.net> <199908021543.IAA13578@apollo.backplane.com> <xzpvhayp4jj.fsf@des.follo.net>
next in thread | previous in thread | raw e-mail | index | archive | help
: Now on to the NFSv2 fhlen patch testing. I haven't run v2 in several : months, hopefully it still works :-) My buildworld using the NFSv2 file handle length patch succeeded as well. I've included the patch again for reference. (Note: I didn't write this patch, refer back to the thread for that info). -Matt Index: nfsm_subs.h =================================================================== RCS file: /home/ncvs/src/sys/nfs/nfsm_subs.h,v retrieving revision 1.24 diff -u -r1.24 nfsm_subs.h --- nfsm_subs.h 1999/06/23 04:44:14 1.24 +++ nfsm_subs.h 1999/08/02 17:22:38 @@ -419,24 +419,25 @@ } } #define nfsm_srvmtofh(f) \ - { int fhlen = NFSX_V3FH; \ + do { \ + int fhlen; \ if (nfsd->nd_flag & ND_NFSV3) { \ nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \ fhlen = fxdr_unsigned(int, *tl); \ - if (fhlen == 0) { \ - bzero((caddr_t)(f), NFSX_V3FH); \ - } else if (fhlen != NFSX_V3FH) { \ + if (fhlen != 0 && fhlen != NFSX_V3FH) { \ error = EBADRPC; \ nfsm_reply(0); \ } \ + } else { \ + fhlen = NFSX_V2FH; \ } \ if (fhlen != 0) { \ - nfsm_dissect(tl, u_int32_t *, NFSX_V3FH); \ - bcopy((caddr_t)tl, (caddr_t)(f), NFSX_V3FH); \ - if ((nfsd->nd_flag & ND_NFSV3) == 0) \ - nfsm_adv(NFSX_V2FH - NFSX_V3FH); \ + nfsm_dissect(tl, u_int32_t *, fhlen); \ + bcopy((caddr_t)tl, (caddr_t)(f), fhlen); \ + } else { \ + bzero((caddr_t)(f), NFSX_V3FH); /* XXX why not do a EBADRPC? */ \ } \ - } + } while (0) #define nfsm_clget \ if (bp >= be) { \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908022318.QAA16171>