summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2009-11-15 03:09:50 +0000
committermarcel <marcel@FreeBSD.org>2009-11-15 03:09:50 +0000
commit98727c096ee4c1bf290d899539be2dab614f1c4a (patch)
tree5f4e28e52903227e968bdecf8f66e79263911deb
parent6655f1214ac30cf0a54e74be98803f8e2e02aa4c (diff)
downloadFreeBSD-src-98727c096ee4c1bf290d899539be2dab614f1c4a.zip
FreeBSD-src-98727c096ee4c1bf290d899539be2dab614f1c4a.tar.gz
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
-rw-r--r--sys/nfsserver/nfs_fha.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/nfsserver/nfs_fha.c b/sys/nfsserver/nfs_fha.c
index cad13dd..0469e4a 100644
--- a/sys/nfsserver/nfs_fha.c
+++ b/sys/nfsserver/nfs_fha.c
@@ -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)
OpenPOWER on IntegriCloud