Commit 978a66ff73add1f462903af92ccf9a34f6a513c2
1 parent
f7806f94
utimes() support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1164 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
16 additions
and
0 deletions
linux-user/arm/syscall_nr.h
linux-user/i386/syscall_nr.h
@@ -271,3 +271,4 @@ | @@ -271,3 +271,4 @@ | ||
271 | #define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) | 271 | #define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) |
272 | #define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) | 272 | #define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) |
273 | 273 | ||
274 | +#define TARGET_NR_utimes 271 |
linux-user/syscall.c
@@ -1742,6 +1742,20 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, | @@ -1742,6 +1742,20 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, | ||
1742 | ret = get_errno(utime((const char *)arg1, tbuf1)); | 1742 | ret = get_errno(utime((const char *)arg1, tbuf1)); |
1743 | } | 1743 | } |
1744 | break; | 1744 | break; |
1745 | + case TARGET_NR_utimes: | ||
1746 | + { | ||
1747 | + struct target_timeval *target_tvp = (struct target_timeval *)arg2; | ||
1748 | + struct timeval *tvp, tv[2]; | ||
1749 | + if (target_tvp) { | ||
1750 | + target_to_host_timeval(&tv[0], &target_tvp[0]); | ||
1751 | + target_to_host_timeval(&tv[1], &target_tvp[1]); | ||
1752 | + tvp = tv; | ||
1753 | + } else { | ||
1754 | + tvp = NULL; | ||
1755 | + } | ||
1756 | + ret = get_errno(utimes((const char *)arg1, tvp)); | ||
1757 | + } | ||
1758 | + break; | ||
1745 | #ifdef TARGET_NR_stty | 1759 | #ifdef TARGET_NR_stty |
1746 | case TARGET_NR_stty: | 1760 | case TARGET_NR_stty: |
1747 | goto unimplemented; | 1761 | goto unimplemented; |