From 8665c4d9cd876cd54dd5d6f80e54cc92acee10aa Mon Sep 17 00:00:00 2001 From: Dmitry Chagin Date: Fri, 24 Feb 2017 19:47:27 +0000 Subject: [PATCH] Revert r314217. Commit is not match that I have approved. --- sys/amd64/linux/linux_dummy.c | 3 ++ sys/amd64/linux32/linux32_dummy.c | 3 ++ sys/amd64/linux32/linux32_machdep.c | 46 ----------------------------- sys/compat/linux/linux_file.c | 46 ----------------------------- sys/i386/linux/linux_dummy.c | 3 ++ 5 files changed, 9 insertions(+), 92 deletions(-) diff --git a/sys/amd64/linux/linux_dummy.c b/sys/amd64/linux/linux_dummy.c index 8045023213b..690205a0e6c 100644 --- a/sys/amd64/linux/linux_dummy.c +++ b/sys/amd64/linux/linux_dummy.c @@ -110,6 +110,9 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); +/* linux 2.6.30: */ +DUMMY(preadv); +DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.38: */ diff --git a/sys/amd64/linux32/linux32_dummy.c b/sys/amd64/linux32/linux32_dummy.c index 8a59859c36f..9ba578c47e0 100644 --- a/sys/amd64/linux32/linux32_dummy.c +++ b/sys/amd64/linux32/linux32_dummy.c @@ -110,6 +110,9 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); +/* linux 2.6.30: */ +DUMMY(preadv); +DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.33: */ diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index 88bb36d247d..5b66d2f90fd 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -241,52 +241,6 @@ linux_writev(struct thread *td, struct linux_writev_args *uap) return (error); } -int -linux_preadv(struct thread *td, struct linux_preadv_args *uap) -{ - struct uio *auio; - int error; - off_t offset; - - error = linux32_copyinuio((struct l_iovec32 *)uap->vec, - uap->vlen, &auio); - if (error) - return (error); - /* - * According http://man7.org/linux/man-pages/man2/preadv.2.html#NOTES - * pos_l and pos_h, respectively, contain the - * low order and high order 32 bits of offset. - */ - offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << - (sizeof(offset) * 4)) | uap->pos_l; - error = kern_preadv(td, uap->fd, auio, offset); - free(auio, M_IOV); - return (error); -} - -int -linux_pwritev(struct thread *td, struct linux_pwritev_args *uap) -{ - struct uio *auio; - int error; - off_t offset; - - error = linux32_copyinuio((struct l_iovec32 *)uap->vec, - uap->vlen, &auio); - if (error) - return (error); - /* - * According http://man7.org/linux/man-pages/man2/pwritev.2.html#NOTES - * pos_l and pos_h, respectively, contain the - * low order and high order 32 bits of offset. - */ - offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << - (sizeof(offset) * 4)) | uap->pos_l; - error = kern_pwritev(td, uap->fd, auio, offset); - free(auio, M_IOV); - return (error); -} - struct l_ipc_kludge { l_uintptr_t msgp; l_long msgtyp; diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 4a430676899..a7695f010ce 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1027,52 +1027,6 @@ linux_pwrite(struct thread *td, struct linux_pwrite_args *uap) return (kern_pwrite(td, uap->fd, uap->buf, uap->nbyte, uap->offset)); } -#if !(defined(__amd64__) && defined(COMPAT_LINUX32)) -int -linux_preadv(struct thread *td, struct linux_preadv_args *uap) -{ - struct uio *auio; - int error; - off_t offset; - - error = copyinuio(uap->vec, uap->vlen, &auio); - if (error) - return (error); - /* - * According http://man7.org/linux/man-pages/man2/preadv.2.html#NOTES - * pos_l and pos_h, respectively, contain the - * low order and high order 32 bits of offset. - */ - offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << - (sizeof(offset) * 4)) | uap->pos_l; - error = kern_preadv(td, uap->fd, auio, offset); - free(auio, M_IOV); - return (error); -} - -int -linux_pwritev(struct thread *td, struct linux_pwritev_args *uap) -{ - struct uio *auio; - int error; - off_t offset; - - error = copyinuio(uap->vec, uap->vlen, &auio); - if (error) - return (error); - /* - * According http://man7.org/linux/man-pages/man2/pwritev.2.html#NOTES - * pos_l and pos_h, respectively, contain the - * low order and high order 32 bits of offset. - */ - offset = (((off_t)uap->pos_h << (sizeof(offset) * 4)) << - (sizeof(offset) * 4)) | uap->pos_l; - error = kern_pwritev(td, uap->fd, auio, offset); - free(auio, M_IOV); - return (error); -} -#endif /* !(__amd64__ && COMPAT_LINUX32) */ - int linux_mount(struct thread *td, struct linux_mount_args *args) { diff --git a/sys/i386/linux/linux_dummy.c b/sys/i386/linux/linux_dummy.c index 06145c0dde5..65f80c6f10b 100644 --- a/sys/i386/linux/linux_dummy.c +++ b/sys/i386/linux/linux_dummy.c @@ -106,6 +106,9 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); +/* linux 2.6.30: */ +DUMMY(preadv); +DUMMY(pwritev); /* linux 2.6.31: */ DUMMY(perf_event_open); /* linux 2.6.33: */