From owner-svn-src-all@FreeBSD.ORG Sat Nov 14 22:20:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3EBC1065679; Sat, 14 Nov 2009 22:20:54 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout025.mac.com (asmtpout025.mac.com [17.148.16.100]) by mx1.freebsd.org (Postfix) with ESMTP id DB87E8FC17; Sat, 14 Nov 2009 22:20:54 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp025.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KT400L0TE1U2T80@asmtp025.mac.com>; Sat, 14 Nov 2009 14:20:20 -0800 (PST) From: Marcel Moolenaar In-reply-to: <20091114.144644.580455928.imp@bsdimp.com> Date: Sat, 14 Nov 2009 14:20:18 -0800 Message-id: <9B515A18-6E30-4FF2-B739-E36BF3E0B84C@mac.com> References: <200911141814.nAEIE7ku008530@svn.freebsd.org> <20091114.144644.580455928.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1077) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, marcel@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r199274 - head/sys/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Nov 2009 22:20:55 -0000 On Nov 14, 2009, at 1:46 PM, M. Warner Losh wrote: > : @@ -206,7 +207,11 @@ fha_extract_info(struct svc_req *req, st > : if (error) > : goto out; > : > : - i->fh = *(const u_int64_t *)(fh.fh_generic.fh_fid.fid_data); > : +#if _BYTE_ORDER == _LITTLE_ENDIAN > : + i->fh = le64dec(fh.fh_generic.fh_fid.fid_data); > : +#else > : + i->fh = be64dec(fh.fh_generic.fh_fid.fid_data); > : +#endif > : > : /* Content ourselves with zero offset for all but reads. */ > : if (procnum != NFSPROC_READ) > > Wouldn't memcpy do the same thing without the need for an ifdef? > > memcpy(&i->fh, fh.fh_generic.fh_fid.fid_data, sizeof(uint64_t)); Yes, it would. Shall I change it to use memcpy? -- Marcel Moolenaar xcllnt@mac.com