[Midnightbsd-cvs] src [9444] trunk/sys/compat/freebsd32: Fix the wait6(2) on 32bit architectures and for the compat32, by using
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Mar 5 14:26:07 EST 2017
Revision: 9444
http://svnweb.midnightbsd.org/src/?rev=9444
Author: laffer1
Date: 2017-03-05 14:26:07 -0500 (Sun, 05 Mar 2017)
Log Message:
-----------
Fix the wait6(2) on 32bit architectures and for the compat32, by using
the right type for the argument in syscalls.master. Also fix the
posix_fallocate(2) and posix_fadvise(2) compat32 syscalls on the
architectures which require padding of the 64bit argument.
Modified Paths:
--------------
trunk/sys/compat/freebsd32/freebsd32_misc.c
trunk/sys/compat/freebsd32/syscalls.master
Modified: trunk/sys/compat/freebsd32/freebsd32_misc.c
===================================================================
--- trunk/sys/compat/freebsd32/freebsd32_misc.c 2017-03-05 19:23:13 UTC (rev 9443)
+++ trunk/sys/compat/freebsd32/freebsd32_misc.c 2017-03-05 19:26:07 UTC (rev 9444)
@@ -195,8 +195,8 @@
} else
sip = NULL;
- error = kern_wait6(td, uap->idtype, uap->id, &status, uap->options,
- wrup, sip);
+ error = kern_wait6(td, uap->idtype, PAIR32TO64(id_t, uap->id),
+ &status, uap->options, wrup, sip);
if (error != 0)
return (error);
if (uap->status != NULL)
Modified: trunk/sys/compat/freebsd32/syscalls.master
===================================================================
--- trunk/sys/compat/freebsd32/syscalls.master 2017-03-05 19:23:13 UTC (rev 9443)
+++ trunk/sys/compat/freebsd32/syscalls.master 2017-03-05 19:26:07 UTC (rev 9444)
@@ -990,6 +990,22 @@
529 AUE_NULL NOPROTO { int rctl_remove_rule(const void *inbufp, \
size_t inbuflen, void *outbufp, \
size_t outbuflen); }
+#ifdef PAD64_REQUIRED
+530 AUE_NULL STD { int freebsd32_posix_fallocate(int fd, \
+ int pad, \
+ uint32_t offset1, uint32_t offset2,\
+ uint32_t len1, uint32_t len2); }
+531 AUE_NULL STD { int freebsd32_posix_fadvise(int fd, \
+ int pad, \
+ uint32_t offset1, uint32_t offset2,\
+ uint32_t len1, uint32_t len2, \
+ int advice); }
+532 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, int pad, \
+ uint32_t id1, uint32_t id2, \
+ int *status, int options, \
+ struct wrusage32 *wrusage, \
+ siginfo_t *info); }
+#else
530 AUE_NULL STD { int freebsd32_posix_fallocate(int fd,\
uint32_t offset1, uint32_t offset2,\
uint32_t len1, uint32_t len2); }
@@ -997,8 +1013,9 @@
uint32_t offset1, uint32_t offset2,\
uint32_t len1, uint32_t len2, \
int advice); }
-532 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, int id, \
+532 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, \
+ uint32_t id1, uint32_t id2, \
int *status, int options, \
struct wrusage32 *wrusage, \
siginfo_t *info); }
-
+#endif
More information about the Midnightbsd-cvs
mailing list