diff options
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 45d6bb2..9806e03 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -89,6 +89,7 @@ __FBSDID("$FreeBSD$"); #include <compat/linux/linux_file.h> #include <compat/linux/linux_mib.h> #include <compat/linux/linux_signal.h> +#include <compat/linux/linux_timer.h> #include <compat/linux/linux_util.h> #include <compat/linux/linux_sysproto.h> #include <compat/linux/linux_emul.h> @@ -2166,8 +2167,9 @@ linux_pselect6(struct thread *td, struct linux_pselect6_args *args) error = copyin(args->tsp, <s, sizeof(lts)); if (error != 0) return (error); - uts.tv_sec = lts.tv_sec; - uts.tv_nsec = lts.tv_nsec; + error = linux_to_native_timespec(&uts, <s); + if (error != 0) + return (error); TIMESPEC_TO_TIMEVAL(&utv, &uts); if (itimerfix(&utv)) @@ -2199,8 +2201,8 @@ linux_pselect6(struct thread *td, struct linux_pselect6_args *args) timevalclear(&utv); TIMEVAL_TO_TIMESPEC(&utv, &uts); - lts.tv_sec = uts.tv_sec; - lts.tv_nsec = uts.tv_nsec; + + native_to_linux_timespec(<s, &uts); error = copyout(<s, args->tsp, sizeof(lts)); } @@ -2232,8 +2234,9 @@ linux_ppoll(struct thread *td, struct linux_ppoll_args *args) error = copyin(args->tsp, <s, sizeof(lts)); if (error) return (error); - uts.tv_sec = lts.tv_sec; - uts.tv_nsec = lts.tv_nsec; + error = linux_to_native_timespec(&uts, <s); + if (error != 0) + return (error); nanotime(&ts0); tsp = &uts; @@ -2252,8 +2255,7 @@ linux_ppoll(struct thread *td, struct linux_ppoll_args *args) } else timespecclear(&uts); - lts.tv_sec = uts.tv_sec; - lts.tv_nsec = uts.tv_nsec; + native_to_linux_timespec(<s, &uts); error = copyout(<s, args->tsp, sizeof(lts)); } @@ -2341,8 +2343,7 @@ linux_sched_rr_get_interval(struct thread *td, PROC_UNLOCK(tdt->td_proc); if (error != 0) return (error); - lts.tv_sec = ts.tv_sec; - lts.tv_nsec = ts.tv_nsec; + native_to_linux_timespec(<s, &ts); return (copyout(<s, uap->interval, sizeof(lts))); } |