diff --git a/sys/alpha/linux/linux_dummy.c b/sys/alpha/linux/linux_dummy.c index 7cdac161d439..25615fd3ff0b 100644 --- a/sys/alpha/linux/linux_dummy.c +++ b/sys/alpha/linux/linux_dummy.c @@ -96,8 +96,6 @@ DUMMY(rt_sigreturn); DUMMY(rt_sigpending); DUMMY(rt_sigtimedwait); DUMMY(rt_sigqueueinfo); -DUMMY(pread); -DUMMY(pwrite); DUMMY(capget); DUMMY(capset); DUMMY(sendfile); diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 90d82c2d3295..2cb2303629ce 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -849,3 +849,31 @@ linux_fdatasync(p, uap) bsd.fd = uap->fd; return fsync(p, &bsd); } + +int +linux_pread(p, uap) + struct proc *p; + struct linux_pread_args *uap; +{ + struct pread_args bsd; + + bsd.fd = uap->fd; + bsd.buf = uap->buf; + bsd.nbyte = uap->nbyte; + bsd.offset = uap->offset; + return pread(p, &bsd); +} + +int +linux_pwrite(p, uap) + struct proc *p; + struct linux_pwrite_args *uap; +{ + struct pwrite_args bsd; + + bsd.fd = uap->fd; + bsd.buf = uap->buf; + bsd.nbyte = uap->nbyte; + bsd.offset = uap->offset; + return pwrite(p, &bsd); +} diff --git a/sys/i386/linux/linux_dummy.c b/sys/i386/linux/linux_dummy.c index 7cdac161d439..25615fd3ff0b 100644 --- a/sys/i386/linux/linux_dummy.c +++ b/sys/i386/linux/linux_dummy.c @@ -96,8 +96,6 @@ DUMMY(rt_sigreturn); DUMMY(rt_sigpending); DUMMY(rt_sigtimedwait); DUMMY(rt_sigqueueinfo); -DUMMY(pread); -DUMMY(pwrite); DUMMY(capget); DUMMY(capset); DUMMY(sendfile); diff --git a/sys/i386/linux/linux_file.c b/sys/i386/linux/linux_file.c index 90d82c2d3295..2cb2303629ce 100644 --- a/sys/i386/linux/linux_file.c +++ b/sys/i386/linux/linux_file.c @@ -849,3 +849,31 @@ linux_fdatasync(p, uap) bsd.fd = uap->fd; return fsync(p, &bsd); } + +int +linux_pread(p, uap) + struct proc *p; + struct linux_pread_args *uap; +{ + struct pread_args bsd; + + bsd.fd = uap->fd; + bsd.buf = uap->buf; + bsd.nbyte = uap->nbyte; + bsd.offset = uap->offset; + return pread(p, &bsd); +} + +int +linux_pwrite(p, uap) + struct proc *p; + struct linux_pwrite_args *uap; +{ + struct pwrite_args bsd; + + bsd.fd = uap->fd; + bsd.buf = uap->buf; + bsd.nbyte = uap->nbyte; + bsd.offset = uap->offset; + return pwrite(p, &bsd); +} diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index c104936d9813..8fbd18eaef0f 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.31 2000/05/09 18:23:16 bde Exp + * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.32 2000/07/17 00:13:38 marcel Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -480,10 +480,16 @@ struct linux_rt_sigsuspend_args { size_t sigsetsize; char sigsetsize_[PAD_(size_t)]; }; struct linux_pread_args { - register_t dummy; + int fd; char fd_[PAD_(int)]; + char * buf; char buf_[PAD_(char *)]; + size_t nbyte; char nbyte_[PAD_(size_t)]; + off_t offset; char offset_[PAD_(off_t)]; }; struct linux_pwrite_args { - register_t dummy; + int fd; char fd_[PAD_(int)]; + const char * buf; char buf_[PAD_(const char *)]; + size_t nbyte; char nbyte_[PAD_(size_t)]; + off_t offset; char offset_[PAD_(off_t)]; }; struct linux_chown_args { char * path; char path_[PAD_(char *)]; diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index d296817654ca..01b5225eb463 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.31 2000/05/09 18:23:16 bde Exp + * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.32 2000/07/17 00:13:38 marcel Exp */ #define LINUX_SYS_linux_setup 0 diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index 60fb5c623a11..340c37d87df2 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.31 2000/05/09 18:23:16 bde Exp + * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.32 2000/07/17 00:13:38 marcel Exp */ #include "opt_compat.h" @@ -197,8 +197,8 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_rt_sigtimedwait }, /* 177 = linux_rt_sigtimedwait */ { 0, (sy_call_t *)linux_rt_sigqueueinfo }, /* 178 = linux_rt_sigqueueinfo */ { AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend }, /* 179 = linux_rt_sigsuspend */ - { 0, (sy_call_t *)linux_pread }, /* 180 = linux_pread */ - { 0, (sy_call_t *)linux_pwrite }, /* 181 = linux_pwrite */ + { AS(linux_pread_args), (sy_call_t *)linux_pread }, /* 180 = linux_pread */ + { AS(linux_pwrite_args), (sy_call_t *)linux_pwrite }, /* 181 = linux_pwrite */ { AS(linux_chown_args), (sy_call_t *)linux_chown }, /* 182 = linux_chown */ { AS(linux_getcwd_args), (sy_call_t *)linux_getcwd }, /* 183 = linux_getcwd */ { 0, (sy_call_t *)linux_capget }, /* 184 = linux_capget */