mirror of https://gitee.com/openkylin/qemu.git
Fix CID 1407221 and stime()
-----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAl3K2usSHGxhdXJlbnRA dml2aWVyLmV1AAoJEPMMOL0/L748q3MQAJ9H2F9fa/bAXizFIf0R4okgiBRe0ZPi DSE6eEgbZ7SCmspkRc6e3L2MYJb3BnYzX3UwubHUvZs1nyx6SSU2F6VIhG1vUaTD VkGiq6Z5ucSISl5fD2FTRk/h/g9y2t9rHsKFa0wSo92+5ntPZ9ZpILd2XjXmkJst TziPgp5unjvQnttgkCZk6eT9crIzrNpIshVwgXFRSBUGHWHLoacpn0daBR7J6Rya zdHUjABYLcuQRnxej23/RqRJ0J0ahCEXt6d84ZwFhKzxXe4yHsqnk6r2tYedy8oF 3eomB1Mm3L//nRYi/n9N699Si3AUxGiT7vqcFKJucHHI9pKyVsE/seNSgp8ZSopp ijBymIFyJExdCh58p8Db8J9pfhxiqsiFPz1urTCUnDE42oEee850/7hpW5SAsc36 qqyF7j+UOEY4UHRIXvAZg32qCreDWLOLIljf/jWXbFpyTlDiUOXmNw1qEvzSEDQJ c5I0uGf0RGUbUkUL9SKihH4N/LxtdgKo360fIYwUF7FC5VVY0wOKe+RHg9hLxhlG nqVhxYr6z0Y9JLnJDdLuP9afwR/i8xr21POzliRP7wMYhisZ6EBPznDQCV0kfK9s 1UQdCPnesJtiXRDJY6BMIYsHrRYEyaYrdIm+fc4ds9tKvptBn558ulZnGNd0zYKb 2jlciB0wROEI =MMZM -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
ef45f7b378
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue