svn commit: r199274 - head/sys/nfsserver

Marcel Moolenaar xcllnt at mac.com
Sat Nov 14 22:20:55 UTC 2009


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 at mac.com





More information about the svn-src-head mailing list