From d5124417a75fdd2c83255ebc42de593e3c15bcfa Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Mon, 17 Jul 2000 00:17:07 +0000 Subject: Implement pread and pwrite. PR: 17991 Submitted by: Geoffrey Speicher --- sys/compat/linux/linux_file.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'sys/compat/linux/linux_file.c') 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); +} -- cgit v1.3