summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_aio.c
diff options
context:
space:
mode:
authordt <dt@FreeBSD.org>1999-04-04 21:41:28 +0000
committerdt <dt@FreeBSD.org>1999-04-04 21:41:28 +0000
commitf13dd5fa6d2de09245e582c2792228f2653fd2a8 (patch)
treede22c23c16202f9effaeaa5beeebcf5a281a09e9 /sys/kern/vfs_aio.c
parentbd8e7f40fbb5601af9da0bd9915ae4985da59b00 (diff)
downloadFreeBSD-src-f13dd5fa6d2de09245e582c2792228f2653fd2a8.zip
FreeBSD-src-f13dd5fa6d2de09245e582c2792228f2653fd2a8.tar.gz
Add standard padding argument to pread and pwrite syscall. That should make them
NetBSD compatible. Add parameter to fo_read and fo_write. (The only flag FOF_OFFSET mean that the offset is set in the struct uio). Factor out some common code from read/pread/write/pwrite syscalls.
Diffstat (limited to 'sys/kern/vfs_aio.c')
-rw-r--r--sys/kern/vfs_aio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 96a3cb3..0c4f448 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -13,7 +13,7 @@
* bad that happens because of using this software isn't the responsibility
* of the author. This software is distributed AS-IS.
*
- * $Id: vfs_aio.c,v 1.43 1999/02/19 14:25:35 luoqi Exp $
+ * $Id: vfs_aio.c,v 1.44 1999/02/25 15:54:06 bde Exp $
*/
/*
@@ -570,10 +570,10 @@ aio_process(struct aiocblist *aiocbe)
oublock_st = mycp->p_stats->p_ru.ru_oublock;
if (cb->aio_lio_opcode == LIO_READ) {
auio.uio_rw = UIO_READ;
- error = (*fp->f_ops->fo_read)(fp, &auio, fp->f_cred);
+ error = (*fp->f_ops->fo_read)(fp, &auio, fp->f_cred, FOF_OFFSET);
} else {
auio.uio_rw = UIO_WRITE;
- error = (*fp->f_ops->fo_write)(fp, &auio, fp->f_cred);
+ error = (*fp->f_ops->fo_write)(fp, &auio, fp->f_cred, FOF_OFFSET);
}
inblock_end = mycp->p_stats->p_ru.ru_inblock;
oublock_end = mycp->p_stats->p_ru.ru_oublock;
@@ -1709,7 +1709,7 @@ aio_read(struct proc *p, struct aio_read_args *uap)
auio.uio_procp = p;
cnt = iocb.aio_nbytes;
- error = (*fp->f_ops->fo_read)(fp, &auio, fp->f_cred);
+ error = (*fp->f_ops->fo_read)(fp, &auio, fp->f_cred, FOF_OFFSET);
if (error &&
(auio.uio_resid != cnt) &&
(error == ERESTART || error == EINTR || error == EWOULDBLOCK))
@@ -1775,7 +1775,7 @@ aio_write(struct proc *p, struct aio_write_args *uap)
auio.uio_procp = p;
cnt = iocb.aio_nbytes;
- error = (*fp->f_ops->fo_write)(fp, &auio, fp->f_cred);
+ error = (*fp->f_ops->fo_write)(fp, &auio, fp->f_cred, FOF_OFFSET);
if (error) {
if (auio.uio_resid != cnt) {
if (error == ERESTART || error == EINTR || error == EWOULDBLOCK)
OpenPOWER on IntegriCloud