diff options
author | marcel <marcel@FreeBSD.org> | 2000-07-17 00:17:07 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2000-07-17 00:17:07 +0000 |
commit | 38404736a1af468a1729b8b316ce7bab7f349ca4 (patch) | |
tree | 324752d14e08f47fa80c3c48416696e1e434e6b8 /sys/compat | |
parent | 53da591ed596df85ce694fd775cd1e380c88720c (diff) | |
download | FreeBSD-src-38404736a1af468a1729b8b316ce7bab7f349ca4.zip FreeBSD-src-38404736a1af468a1729b8b316ce7bab7f349ca4.tar.gz |
Implement pread and pwrite.
PR: 17991
Submitted by: Geoffrey Speicher <geoff@caribbean.sea-incorporated.com>
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_file.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 90d82c2..2cb2303 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); +} |