diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-28 22:32:06 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-28 22:32:06 +0000 |
commit | f2c7ba159b2066ea5c2a1c00816f7a5debb8b024 (patch) | |
tree | 4a6d7b95e5c9d11f2779afebd5c5e5585ea1191e | |
parent | ce3f0e2f119b1a80636df165db807fdc7fbc349a (diff) |
add pread64 and pwrite64 system calls
(Gary Thomas)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4126 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | linux-user/syscall.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a15c93567e..b1dc365e6e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4875,6 +4875,20 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, unlock_user(p, arg2, 0); break; #endif +#ifdef TARGET_NR_pread64 + case TARGET_NR_pread64: + if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0))) + goto efault; + ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5))); + unlock_user(p, arg2, ret); + break; + case TARGET_NR_pwrite64: + if (!(p = lock_user(VERIFY_READ, arg2, arg3, 1))) + goto efault; + ret = get_errno(pwrite64(arg1, p, arg3, target_offset64(arg4, arg5))); + unlock_user(p, arg2, 0); + break; +#endif case TARGET_NR_getcwd: if (!(p = lock_user(VERIFY_WRITE, arg1, arg2, 0))) goto efault; |