From owner-svn-src-head@FreeBSD.ORG Fri Oct 14 11:46:46 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80138106566B; Fri, 14 Oct 2011 11:46:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FC798FC1B; Fri, 14 Oct 2011 11:46:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9EBkklv061860; Fri, 14 Oct 2011 11:46:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9EBkkDW061857; Fri, 14 Oct 2011 11:46:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201110141146.p9EBkkDW061857@svn.freebsd.org> From: John Baldwin Date: Fri, 14 Oct 2011 11:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226364 - head/sys/compat/freebsd32 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2011 11:46:46 -0000 Author: jhb Date: Fri Oct 14 11:46:46 2011 New Revision: 226364 URL: http://svn.freebsd.org/changeset/base/226364 Log: Use PAIR32TO64() for the offset and length parameters to freebsd32_posix_fallocate() to properly handle big-endian platforms. Reviewed by: mdf MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/syscalls.master Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Oct 14 10:43:55 2011 (r226363) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Oct 14 11:46:46 2011 (r226364) @@ -2831,7 +2831,7 @@ freebsd32_posix_fallocate(struct thread struct posix_fallocate_args ap; ap.fd = uap->fd; - ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32)); - ap.len = (uap->lenlo | ((off_t)uap->lenhi << 32)); + ap.offset = PAIR32TO64(off_t, uap->offset); + ap.len = PAIR32TO64(off_t, uap->len); return (sys_posix_fallocate(td, &ap)); } Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Fri Oct 14 10:43:55 2011 (r226363) +++ head/sys/compat/freebsd32/syscalls.master Fri Oct 14 11:46:46 2011 (r226364) @@ -989,6 +989,6 @@ size_t inbuflen, void *outbufp, \ size_t outbuflen); } 530 AUE_NULL STD { int freebsd32_posix_fallocate(int fd,\ - uint32_t offsetlo, uint32_t offsethi,\ - uint32_t lenlo, uint32_t lenhi); } + uint32_t offset1, uint32_t offset2,\ + uint32_t len1, uint32_t len2); } 531 AUE_NULL UNIMPL posix_fadvise