Date: Sun, 15 Nov 2009 03:09:50 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r199284 - head/sys/nfsserver Message-ID: <200911150309.nAF39oYJ021170@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Sun Nov 15 03:09:50 2009 New Revision: 199284 URL: http://svn.freebsd.org/changeset/base/199284 Log: 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 Modified: head/sys/nfsserver/nfs_fha.c Modified: head/sys/nfsserver/nfs_fha.c ============================================================================== --- head/sys/nfsserver/nfs_fha.c Sat Nov 14 23:35:37 2009 (r199283) +++ head/sys/nfsserver/nfs_fha.c Sun Nov 15 03:09:50 2009 (r199284) @@ -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, st 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911150309.nAF39oYJ021170>