aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-04-16 14:14:53 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-04-16 14:14:53 +0000
commit248366894044f564ce56ac6340882bde17d24ec7 (patch)
tree415d0139c468916638ec2187bf6f87588570f140 /linux-user/syscall.c
parentd4b8f0396a04309454e0e48aacb7809cf08ab8e2 (diff)
downloadqemu-248366894044f564ce56ac6340882bde17d24ec7.zip
qemu-248366894044f564ce56ac6340882bde17d24ec7.tar.gz
qemu-248366894044f564ce56ac6340882bde17d24ec7.tar.bz2
Implement acct and pretend to implement madvise.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1819 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 2b13247..516b32b 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2145,7 +2145,10 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
goto unimplemented;
case TARGET_NR_acct:
- goto unimplemented;
+ p = lock_user_string(arg1);
+ ret = get_errno(acct(path(p)));
+ unlock_user(p, arg1, 0);
+ break;
case TARGET_NR_umount2:
p = lock_user_string(arg1);
ret = get_errno(umount2(p, arg2));
@@ -3547,7 +3550,12 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
#endif
#ifdef TARGET_NR_madvise
case TARGET_NR_madvise:
- goto unimplemented;
+ /* A straight passthrough may not be safe because qemu sometimes
+ turns private flie-backed mappings into anonymous mappings.
+ This will break MADV_DONTNEED.
+ This is a hint, so ignoring and returning success is ok. */
+ ret = get_errno(0);
+ break;
#endif
#if TARGET_LONG_BITS == 32
case TARGET_NR_fcntl64: