Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jan 2012 16:29:46 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r229500 - stable/9/sys/compat/freebsd32
Message-ID:  <201201041629.q04GTkFe086643@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Jan  4 16:29:45 2012
New Revision: 229500
URL: http://svn.freebsd.org/changeset/base/229500

Log:
  MFC 226364:
  Use PAIR32TO64() for the offset and length parameters to
  freebsd32_posix_fallocate() to properly handle big-endian platforms.

Modified:
  stable/9/sys/compat/freebsd32/freebsd32_misc.c
  stable/9/sys/compat/freebsd32/syscalls.master
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- stable/9/sys/compat/freebsd32/freebsd32_misc.c	Wed Jan  4 16:26:45 2012	(r229499)
+++ stable/9/sys/compat/freebsd32/freebsd32_misc.c	Wed Jan  4 16:29:45 2012	(r229500)
@@ -2811,7 +2811,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: stable/9/sys/compat/freebsd32/syscalls.master
==============================================================================
--- stable/9/sys/compat/freebsd32/syscalls.master	Wed Jan  4 16:26:45 2012	(r229499)
+++ stable/9/sys/compat/freebsd32/syscalls.master	Wed Jan  4 16:29:45 2012	(r229500)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201041629.q04GTkFe086643>