diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-07-28 00:13:59 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-07-28 00:13:59 +0000 |
commit | 70ac9fcbf4cbec8e4d581e0b0f8b229456a5a517 (patch) | |
tree | b442ce56b4b49eb012118536460cb63905d9fb20 /sys/ufs/ext2fs/ext2fs_lookup.c | |
parent | 7308bbe616f2495a440fa39e81d63067dad625ad (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_lookup.c')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_lookup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_lookup.c b/sys/ufs/ext2fs/ext2fs_lookup.c index c19c1b81dd3..68f39342885 100644 --- a/sys/ufs/ext2fs/ext2fs_lookup.c +++ b/sys/ufs/ext2fs/ext2fs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_lookup.c,v 1.4 1998/01/12 00:45:06 csapuntz Exp $ */ +/* $OpenBSD: ext2fs_lookup.c,v 1.5 1998/07/28 00:13:14 millert Exp $ */ /* $NetBSD: ext2fs_lookup.c,v 1.1 1997/06/11 09:33:59 bouyer Exp $ */ /* @@ -992,7 +992,8 @@ ext2fs_dirempty(ip, parentino, cred) register off_t off; struct ext2fs_dirtemplate dbuf; register struct ext2fs_direct *dp = (struct ext2fs_direct *)&dbuf; - int error, count, namlen; + int error, namlen; + size_t count; #define MINDIRSIZ (sizeof (struct ext2fs_dirtemplate) / 2) @@ -1062,7 +1063,7 @@ ext2fs_checkpath(source, target, cred) } error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf, sizeof (struct ext2fs_dirtemplate), (off_t)0, UIO_SYSSPACE, - IO_NODELOCKED, cred, (int *)0, (struct proc *)0); + IO_NODELOCKED, cred, NULL, (struct proc *)0); if (error != 0) break; namlen = dirbuf.dotdot_namlen; |