Commit f2c7ba159b2066ea5c2a1c00816f7a5debb8b024
1 parent
ce3f0e2f
add pread64 and pwrite64 system calls
(Gary Thomas) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4126 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
14 additions
and
0 deletions
linux-user/syscall.c
... | ... | @@ -4875,6 +4875,20 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, |
4875 | 4875 | unlock_user(p, arg2, 0); |
4876 | 4876 | break; |
4877 | 4877 | #endif |
4878 | +#ifdef TARGET_NR_pread64 | |
4879 | + case TARGET_NR_pread64: | |
4880 | + if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0))) | |
4881 | + goto efault; | |
4882 | + ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5))); | |
4883 | + unlock_user(p, arg2, ret); | |
4884 | + break; | |
4885 | + case TARGET_NR_pwrite64: | |
4886 | + if (!(p = lock_user(VERIFY_READ, arg2, arg3, 1))) | |
4887 | + goto efault; | |
4888 | + ret = get_errno(pwrite64(arg1, p, arg3, target_offset64(arg4, arg5))); | |
4889 | + unlock_user(p, arg2, 0); | |
4890 | + break; | |
4891 | +#endif | |
4878 | 4892 | case TARGET_NR_getcwd: |
4879 | 4893 | if (!(p = lock_user(VERIFY_WRITE, arg1, arg2, 0))) |
4880 | 4894 | goto efault; | ... | ... |