Skip to content

Commit

Permalink
utimes() support
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1164 c046a42c-6fe2-441c-8c8c-71466251a162
  • Loading branch information
bellard committed Dec 6, 2004
1 parent f7806f9 commit 978a66f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions linux-user/arm/syscall_nr.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,4 @@
/* 254 for set_thread_area */
/* 255 for get_thread_area */
/* 256 for set_tid_address */
#define TARGET_NR_utimes (269)
1 change: 1 addition & 0 deletions linux-user/i386/syscall_nr.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,4 @@
#define TARGET_NR_clock_getres (TARGET_NR_timer_create+7)
#define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8)

#define TARGET_NR_utimes 271
14 changes: 14 additions & 0 deletions linux-user/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,20 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
ret = get_errno(utime((const char *)arg1, tbuf1));
}
break;
case TARGET_NR_utimes:
{
struct target_timeval *target_tvp = (struct target_timeval *)arg2;
struct timeval *tvp, tv[2];
if (target_tvp) {
target_to_host_timeval(&tv[0], &target_tvp[0]);
target_to_host_timeval(&tv[1], &target_tvp[1]);
tvp = tv;
} else {
tvp = NULL;
}
ret = get_errno(utimes((const char *)arg1, tvp));
}
break;
#ifdef TARGET_NR_stty
case TARGET_NR_stty:
goto unimplemented;
Expand Down

0 comments on commit 978a66f

Please sign in to comment.