[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 34/49] linux-user: Split out stime
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v6 34/49] linux-user: Split out stime |
Date: |
Sat, 19 Jan 2019 08:31:07 +1100 |
Signed-off-by: Richard Henderson <address@hidden>
---
linux-user/syscall-defs.h | 3 +++
linux-user/syscall-time.inc.c | 12 ++++++++++++
linux-user/syscall.c | 9 ---------
linux-user/strace.list | 3 ---
4 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/linux-user/syscall-defs.h b/linux-user/syscall-defs.h
index 0d8da0c6d6..6ca82af397 100644
--- a/linux-user/syscall-defs.h
+++ b/linux-user/syscall-defs.h
@@ -152,6 +152,9 @@ SYSCALL_DEF(shmdt, ARG_PTR);
#if !defined(SYSCALL_TABLE) || defined(TARGET_NR_shmget)
SYSCALL_DEF(shmget, ARG_DEC, ARG_DEC, ARG_HEX);
#endif
+#ifdef TARGET_NR_stime
+SYSCALL_DEF(stime, ARG_PTR);
+#endif
#ifdef TARGET_NR_time
SYSCALL_DEF(time, ARG_PTR);
#endif
diff --git a/linux-user/syscall-time.inc.c b/linux-user/syscall-time.inc.c
index 14fec88e47..d1fb72bde0 100644
--- a/linux-user/syscall-time.inc.c
+++ b/linux-user/syscall-time.inc.c
@@ -16,6 +16,18 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef TARGET_NR_stime
+SYSCALL_IMPL(stime)
+{
+ time_t host_time;
+
+ if (get_user_sal(host_time, arg1)) {
+ return -TARGET_EFAULT;
+ }
+ return get_errno(stime(&host_time));
+}
+#endif
+
#ifdef TARGET_NR_time
SYSCALL_IMPL(time)
{
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index b35d84794f..c0ce4068b6 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5327,15 +5327,6 @@ static abi_long do_syscall1(void *cpu_env, int num,
abi_long arg1,
void *p;
switch(num) {
-#ifdef TARGET_NR_stime /* not on alpha */
- case TARGET_NR_stime:
- {
- time_t host_time;
- if (get_user_sal(host_time, arg1))
- return -TARGET_EFAULT;
- return get_errno(stime(&host_time));
- }
-#endif
#ifdef TARGET_NR_alarm /* not on alpha */
case TARGET_NR_alarm:
return alarm(arg1);
diff --git a/linux-user/strace.list b/linux-user/strace.list
index 0f32c456cd..a5f308c497 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -1254,9 +1254,6 @@
#ifdef TARGET_NR_statfs64
{ TARGET_NR_statfs64, "statfs64" , NULL, print_statfs64, NULL },
#endif
-#ifdef TARGET_NR_stime
-{ TARGET_NR_stime, "stime" , NULL, NULL, NULL },
-#endif
#ifdef TARGET_NR_streams1
{ TARGET_NR_streams1, "streams1" , NULL, NULL, NULL },
#endif
--
2.17.2
- [Qemu-devel] [PATCH v6 22/49] linux-user: Split out link, linkat, (continued)
- [Qemu-devel] [PATCH v6 22/49] linux-user: Split out link, linkat, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 24/49] linux-user: Split out execve, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 28/49] linux-user: Split out mknod, mknodat, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 25/49] linux-user: Implement execveat, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 23/49] linux-user: Split out unlink, unlinkat, rmdir, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 27/49] linux-user: Split out time, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 29/49] linux-user: Split out chmod, fchmod, fchmodat, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 30/49] linux-user: Split out lseek, llseek, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 31/49] linux-user: Split out getpid, getppid, getxpid, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 33/49] linux-user: Split out umount, umount2, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 34/49] linux-user: Split out stime,
Richard Henderson <=
- [Qemu-devel] [PATCH v6 32/49] linux-user: Split out mount, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 35/49] linux-user: Split out alarm, pause, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 36/49] linux-user: Split out utime, utimes, futimesat, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 39/49] linux-user: Split out sync, syncfs, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 38/49] linux-user: Split out nice, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 37/49] linux-user: Split out access, faccessat, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 40/49] linux-user: Split out kill, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 41/49] linux-user: Split out rename, renameat, renameat2, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 42/49] linux-user: Split out mkdir, mkdirat, Richard Henderson, 2019/01/18
- [Qemu-devel] [PATCH v6 43/49] linux-user: Split out dup, dup2, dup3, Richard Henderson, 2019/01/18