diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-11-12 17:46:57 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-11-12 17:46:57 +0000 |
commit | ef45f7b3788caf7d2501702eddd912868f9c008e (patch) | |
tree | c2ebd155ae70ba8dc2e535de89bfe91b441f4f97 | |
parent | 04d57cfa7eec070f54978a3c7b313428e4a282cc (diff) | |
parent | 0f1f2d4596aee037d3ccbcf10592466daa54107f (diff) | |
download | qemu-ef45f7b3788caf7d2501702eddd912868f9c008e.zip qemu-ef45f7b3788caf7d2501702eddd912868f9c008e.tar.gz qemu-ef45f7b3788caf7d2501702eddd912868f9c008e.tar.bz2 |
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.2-pull-request' into staging
Fix CID 1407221 and stime()
# gpg: Signature made Tue 12 Nov 2019 16:16:43 GMT
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier2/tags/linux-user-for-4.2-pull-request:
linux-user: remove host stime() syscall
linux-user: fix missing break
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | linux-user/syscall.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ab9d933..ce399a5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2632,6 +2632,7 @@ static abi_long do_getsockopt(int sockfd, int level, int optname, default: goto unimplemented; } + break; #endif /* SOL_NETLINK */ default: unimplemented: @@ -7763,10 +7764,12 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, #ifdef TARGET_NR_stime /* not on alpha */ case TARGET_NR_stime: { - time_t host_time; - if (get_user_sal(host_time, arg1)) + struct timespec ts; + ts.tv_nsec = 0; + if (get_user_sal(ts.tv_sec, arg1)) { return -TARGET_EFAULT; - return get_errno(stime(&host_time)); + } + return get_errno(clock_settime(CLOCK_REALTIME, &ts)); } #endif #ifdef TARGET_NR_alarm /* not on alpha */ |