svn commit: r229500 - stable/9/sys/compat/freebsd32
John Baldwin
jhb at FreeBSD.org
Wed Jan 4 16:29:46 UTC 2012
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
More information about the svn-src-stable-9
mailing list