add pread64/pwrite64
PATCH 1/1 add pread64/pwrite64
The attached patch adds the pread64() and pwrite64() system calls
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
syscall.c +14 -0
@@ -4880,6 +4880,20 @@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;