提交 f72e8ff4 编写于 作者: B bellard

utime fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@780 c046a42c-6fe2-441c-8c8c-71466251a162
上级 b06eddd3
...@@ -1729,11 +1729,16 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, ...@@ -1729,11 +1729,16 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
break; break;
case TARGET_NR_utime: case TARGET_NR_utime:
{ {
struct utimbuf tbuf; struct utimbuf tbuf, *tbuf1;
struct target_utimbuf *target_tbuf = (void *)arg2; struct target_utimbuf *target_tbuf = (void *)arg2;
tbuf.actime = tswapl(target_tbuf->actime); if (target_tbuf) {
tbuf.modtime = tswapl(target_tbuf->modtime); get_user(tbuf.actime, &target_tbuf->actime);
ret = get_errno(utime((const char *)arg1, &tbuf)); get_user(tbuf.modtime, &target_tbuf->modtime);
tbuf1 = &tbuf;
} else {
tbuf1 = NULL;
}
ret = get_errno(utime((const char *)arg1, tbuf1));
} }
break; break;
#ifdef TARGET_NR_stty #ifdef TARGET_NR_stty
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册