summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric van Gyzen <vangyzen@FreeBSD.org>2017-03-21 01:23:34 +0000
committerEric van Gyzen <vangyzen@FreeBSD.org>2017-03-21 01:23:34 +0000
commitbe0b16b3f68b1a8aa3742ff293d0f4f830c1f6a7 (patch)
treeb00ab287de295558b6c7f26afe4009035b680306
parentb9b5fd94627ea1bd45aba2f97f7ec80c0b3d0f27 (diff)
Notes
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c2
-rw-r--r--sys/compat/linux/linux_time.c4
-rw-r--r--sys/kern/kern_time.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index c90f796e348f..86b1399a98c0 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -2241,7 +2241,7 @@ freebsd32_nanosleep(struct thread *td, struct freebsd32_nanosleep_args *uap)
!useracc((caddr_t)uap->rmtp, sizeof(rmt), VM_PROT_WRITE))
return (EFAULT);
error = kern_nanosleep(td, &rqt, &rmt);
- if (error && uap->rmtp) {
+ if (error == EINTR && uap->rmtp) {
int error2;
CP(rmt, rmt32, tv_sec);
diff --git a/sys/compat/linux/linux_time.c b/sys/compat/linux/linux_time.c
index 2d293306ee61..82a6dcc1669a 100644
--- a/sys/compat/linux/linux_time.c
+++ b/sys/compat/linux/linux_time.c
@@ -489,7 +489,7 @@ linux_nanosleep(struct thread *td, struct linux_nanosleep_args *args)
return (error);
}
error = kern_nanosleep(td, &rqts, rmtp);
- if (args->rmtp != NULL) {
+ if (error == EINTR && args->rmtp != NULL) {
native_to_linux_timespec(&lrmts, rmtp);
error2 = copyout(&lrmts, args->rmtp, sizeof(lrmts));
if (error2 != 0) {
@@ -551,7 +551,7 @@ linux_clock_nanosleep(struct thread *td, struct linux_clock_nanosleep_args *args
return (error);
}
error = kern_nanosleep(td, &rqts, rmtp);
- if (args->rmtp != NULL) {
+ if (error == EINTR && args->rmtp != NULL) {
/* XXX. Not for TIMER_ABSTIME */
native_to_linux_timespec(&lrmts, rmtp);
error2 = copyout(&lrmts, args->rmtp, sizeof(lrmts));
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index 10557b50830b..6255d2de22c2 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -541,7 +541,7 @@ sys_nanosleep(struct thread *td, struct nanosleep_args *uap)
!useracc((caddr_t)uap->rmtp, sizeof(rmt), VM_PROT_WRITE))
return (EFAULT);
error = kern_nanosleep(td, &rqt, &rmt);
- if (error && uap->rmtp) {
+ if (error == EINTR && uap->rmtp) {
int error2;
error2 = copyout(&rmt, uap->rmtp, sizeof(rmt));