asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char * buf, size_t count, long dummy, loff_t pos) { extern asmlinkage ssize_t sys_pread64(unsigned int fd, char * buf, size_t count, loff_t pos); return sys_pread64(fd, buf, count, pos); }
asmlinkage compat_ssize_t sys32_pread64(unsigned int fd, char __user *ubuf, compat_size_t count, unsigned long poshi, unsigned long poslo) { return sys_pread64(fd, ubuf, count, (poshi << 32) | poslo); }
static void my_pread(const char *file, const char *fail_message, int fd, void *buf, size_t bufsz, uintptr_t pos) { ssize_t result = sys_pread64(fd, buf, bufsz, pos); if (result < 0) fail(file, fail_message, "errno", my_errno, NULL, 0); if ((size_t) result != bufsz) fail(file, fail_message, "read count", result, NULL, 0); }
/* * The UnixWare 7 pread64/pwrite64 syscalls are the same as in Linux, * but we can't easily handle long long syscall parameters for lcall7, * thus we have to fake two 32bit arguments instead. */ ssize_t uw7_pread64(int fd, char *bufp, int count, u_int pos, u_int pos_hi) { return sys_pread64(fd, bufp, count, (pos | (loff_t)pos_hi << 32)); }
long compat_sys_pread64(unsigned int fd, char __user *ubuf, size_t count, u32 dummy, u32 low, u32 high) { return sys_pread64(fd, ubuf, count, ((loff_t)high << 32) | low); }
asmlinkage ssize_t sys_pread64_metag(unsigned long fd, char __user *buf, size_t count, unsigned long lo, unsigned long hi) { return sys_pread64(fd, buf, count, merge_64(hi, lo)); }
compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t count, u32 reg6, u32 poshi, u32 poslo) { return sys_pread64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo); }
asmlinkage ssize_t sys_lkl_pread64(unsigned int fd, char *buf, size_t count, off_t pos_hi, off_t pos_lo) { return sys_pread64(fd, buf, count, ((loff_t)pos_hi << 32) + pos_lo); }
asmlinkage ssize_t trimedia_pread64(unsigned int fd, char __user *buf, size_t count, unsigned int low , unsigned int high) { return sys_pread64(fd, buf, count, (loff_t)high << 32 | low); }
COMPAT_SYSCALL_DEFINE6(pread64, unsigned int, fd, char __user *, ubuf, size_t, count, u32, dummy, u32, low, u32, high) { return sys_pread64(fd, ubuf, count, ((loff_t)high << 32) | low); }