Revert previous change and fix misalignment by using bcopy()

to copy the file handle from fid_data into fh. This eliminates
conditional compilation.

Pointed out by:	imp
This commit is contained in:
Marcel Moolenaar 2009-11-15 03:09:50 +00:00
parent 7ab07e8ada
commit 2181bc851f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=199284

View File

@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/endian.h>
#include <sys/sysctl.h>
#include <sys/vnode.h>
#include <sys/malloc.h>
@ -207,11 +206,7 @@ fha_extract_info(struct svc_req *req, struct fha_info *i)
if (error)
goto out;
#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
bcopy(fh.fh_generic.fh_fid.fid_data, &i->fh, sizeof(i->fh));
/* Content ourselves with zero offset for all but reads. */
if (procnum != NFSPROC_READ)