summaryrefslogtreecommitdiff
path: root/sys/ufs/ext2fs/ext2fs_vnops.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-07-28 00:13:59 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-07-28 00:13:59 +0000
commit70ac9fcbf4cbec8e4d581e0b0f8b229456a5a517 (patch)
treeb442ce56b4b49eb012118536460cb63905d9fb20 /sys/ufs/ext2fs/ext2fs_vnops.c
parent7308bbe616f2495a440fa39e81d63067dad625ad (diff)
Return EINVAL when msg_iovlen or iovcnt <= 0; Make uio_resid unsigned (size_t) and don't return EINVAL if it is < 0 in sys_{read,write}. Remove check for uio_resid < 0 uiomove() now that uio_resid is unsigned and brack remaining panics with #ifdef DIAGNOSTIC. vn_rdwr() must now take a size_t * as its 9th argument so change that and clean up uses of vn_rdwr(). Fixes 549 + more
Diffstat (limited to 'sys/ufs/ext2fs/ext2fs_vnops.c')
-rw-r--r--sys/ufs/ext2fs/ext2fs_vnops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c
index 8a3d6c0d72f..7a8755fb7a9 100644
--- a/sys/ufs/ext2fs/ext2fs_vnops.c
+++ b/sys/ufs/ext2fs/ext2fs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_vnops.c,v 1.6 1997/11/06 05:59:16 csapuntz Exp $ */
+/* $OpenBSD: ext2fs_vnops.c,v 1.7 1998/07/28 00:13:15 millert Exp $ */
/* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */
/*
@@ -890,7 +890,7 @@ abortit:
error = vn_rdwr(UIO_READ, fvp, (caddr_t)&dirbuf,
sizeof (struct ext2fs_dirtemplate), (off_t)0,
UIO_SYSSPACE, IO_NODELOCKED,
- tcnp->cn_cred, (int *)0, (struct proc *)0);
+ tcnp->cn_cred, NULL, (struct proc *)0);
if (error == 0) {
namlen = dirbuf.dotdot_namlen;
if (namlen != 2 ||
@@ -905,7 +905,7 @@ abortit:
sizeof (struct dirtemplate),
(off_t)0, UIO_SYSSPACE,
IO_NODELOCKED|IO_SYNC,
- tcnp->cn_cred, (int *)0,
+ tcnp->cn_cred, NULL,
(struct proc *)0);
cache_purge(fdvp);
}
@@ -1019,7 +1019,7 @@ ext2fs_mkdir(v)
dirtemplate.dotdot_reclen = VTOI(dvp)->i_e2fs->e2fs_bsize - 12;
error = vn_rdwr(UIO_WRITE, tvp, (caddr_t)&dirtemplate,
sizeof (dirtemplate), (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED|IO_SYNC, cnp->cn_cred, (int *)0, (struct proc *)0);
+ IO_NODELOCKED|IO_SYNC, cnp->cn_cred, NULL, (struct proc *)0);
if (error) {
dp->i_e2fs_nlink--;
dp->i_flag |= IN_CHANGE;
@@ -1168,7 +1168,7 @@ ext2fs_symlink(v)
ip->i_flag |= IN_CHANGE | IN_UPDATE;
} else
error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0,
- UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, (int *)0,
+ UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, NULL,
(struct proc *)0);
vput(vp);
return (error);