summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kempf <stefan@cvs.openbsd.org>2016-02-16 17:56:13 +0000
committerStefan Kempf <stefan@cvs.openbsd.org>2016-02-16 17:56:13 +0000
commit030d621b49092c2ddffe5effcf45c9738a13cac1 (patch)
tree8bfc2b39d0425cd2b4781d3f7c2b8f083f680836
parentd6456e0471e0bed6a73bedca23bb40ba014c5762 (diff)
Convert to uiomove. From Martin Natano.
-rw-r--r--sys/ufs/ext2fs/ext2fs_lookup.c4
-rw-r--r--sys/ufs/ext2fs/ext2fs_readwrite.c16
-rw-r--r--sys/ufs/ext2fs/ext2fs_vnops.c6
-rw-r--r--sys/ufs/ffs/ffs_vnops.c12
-rw-r--r--sys/ufs/ufs/ufs_vnops.c8
5 files changed, 23 insertions, 23 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_lookup.c b/sys/ufs/ext2fs/ext2fs_lookup.c
index 95ea6349009..6f9f670b597 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.39 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: ext2fs_lookup.c,v 1.40 2016/02/16 17:56:12 stefan Exp $ */
/* $NetBSD: ext2fs_lookup.c,v 1.16 2000/08/03 20:29:26 thorpej Exp $ */
/*
@@ -177,7 +177,7 @@ ext2fs_readdir(void *v)
break;
}
dstd.d_off = off + e2d_reclen;
- if ((error = uiomovei((caddr_t)&dstd, dstd.d_reclen, uio)) != 0) {
+ if ((error = uiomove((caddr_t)&dstd, dstd.d_reclen, uio)) != 0) {
break;
}
off = off + e2d_reclen;
diff --git a/sys/ufs/ext2fs/ext2fs_readwrite.c b/sys/ufs/ext2fs/ext2fs_readwrite.c
index 04c8ffdb780..33cbcef0d1f 100644
--- a/sys/ufs/ext2fs/ext2fs_readwrite.c
+++ b/sys/ufs/ext2fs/ext2fs_readwrite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_readwrite.c,v 1.36 2016/01/12 11:44:21 mpi Exp $ */
+/* $OpenBSD: ext2fs_readwrite.c,v 1.37 2016/02/16 17:56:12 stefan Exp $ */
/* $NetBSD: ext2fs_readwrite.c,v 1.16 2001/02/27 04:37:47 chs Exp $ */
/*-
@@ -87,7 +87,7 @@ ext2_ind_read(struct vnode *vp, struct inode *ip, struct m_ext2fs *fs,
struct buf *bp;
daddr_t lbn, nextlbn;
off_t bytesinfile;
- long size, xfersize, blkoffset;
+ int size, xfersize, blkoffset;
int error;
#ifdef DIAGNOSTIC
@@ -145,7 +145,7 @@ ext2_ind_read(struct vnode *vp, struct inode *ip, struct m_ext2fs *fs,
break;
xfersize = size;
}
- error = uiomovei((char *)bp->b_data + blkoffset, xfersize, uio);
+ error = uiomove((char *)bp->b_data + blkoffset, xfersize, uio);
if (error)
break;
brelse(bp);
@@ -168,7 +168,7 @@ ext4_ext_read(struct vnode *vp, struct inode *ip, struct m_ext2fs *fs, struct ui
size_t orig_resid;
daddr_t lbn, pos;
off_t bytesinfile;
- long size, xfersize, blkoffset;
+ int size, xfersize, blkoffset;
int error, cache_type;
memset(&path, 0, sizeof path);
@@ -225,7 +225,7 @@ ext4_ext_read(struct vnode *vp, struct inode *ip, struct m_ext2fs *fs, struct ui
}
xfersize = size;
}
- error = uiomovei(bp->b_data + blkoffset, xfersize, uio);
+ error = uiomove(bp->b_data + blkoffset, xfersize, uio);
brelse(bp);
if (error)
return (error);
@@ -248,7 +248,8 @@ ext2fs_write(void *v)
int32_t lbn;
off_t osize;
int blkoffset, error, flags, ioflag, size, xfersize;
- ssize_t resid, overrun;
+ size_t resid;
+ ssize_t overrun;
ioflag = ap->a_ioflag;
uio = ap->a_uio;
@@ -324,8 +325,7 @@ ext2fs_write(void *v)
if (size < xfersize)
xfersize = size;
- error =
- uiomovei((char *)bp->b_data + blkoffset, (int)xfersize, uio);
+ error = uiomove((char *)bp->b_data + blkoffset, xfersize, uio);
#if 0
if (ioflag & IO_NOCACHE)
bp->b_flags |= B_NOCACHE;
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c
index 13c3356781b..364b083ef52 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.73 2015/04/17 04:43:21 guenther Exp $ */
+/* $OpenBSD: ext2fs_vnops.c,v 1.74 2016/02/16 17:56:12 stefan Exp $ */
/* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */
/*
@@ -1116,12 +1116,12 @@ ext2fs_readlink(void *v)
struct vop_readlink_args *ap = v;
struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp);
- int isize;
+ u_int64_t isize;
isize = ext2fs_size(ip);
if (isize < vp->v_mount->mnt_maxsymlinklen ||
(vp->v_mount->mnt_maxsymlinklen == 0 && ip->i_e2fs_nblock == 0)) {
- return (uiomovei((char *)ip->i_e2din->e2di_shortlink, isize,
+ return (uiomove((char *)ip->i_e2din->e2di_shortlink, isize,
ap->a_uio));
}
return (VOP_READ(vp, ap->a_uio, 0, ap->a_cred));
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 730c74699d8..9673f3c61da 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vnops.c,v 1.81 2016/01/12 11:41:00 mpi Exp $ */
+/* $OpenBSD: ffs_vnops.c,v 1.82 2016/02/16 17:56:12 stefan Exp $ */
/* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */
/*
@@ -193,7 +193,7 @@ ffs_read(void *v)
struct buf *bp;
daddr_t lbn, nextlbn;
off_t bytesinfile;
- long size, xfersize, blkoffset;
+ int size, xfersize, blkoffset;
mode_t mode;
int error;
@@ -258,7 +258,7 @@ ffs_read(void *v)
break;
xfersize = size;
}
- error = uiomovei(bp->b_data + blkoffset, (int)xfersize, uio);
+ error = uiomove(bp->b_data + blkoffset, xfersize, uio);
if (error)
break;
brelse(bp);
@@ -287,7 +287,8 @@ ffs_write(void *v)
daddr_t lbn;
off_t osize;
int blkoffset, error, extended, flags, ioflag, size, xfersize;
- ssize_t resid, overrun;
+ size_t resid;
+ ssize_t overrun;
extended = 0;
ioflag = ap->a_ioflag;
@@ -362,8 +363,7 @@ ffs_write(void *v)
if (size < xfersize)
xfersize = size;
- error =
- uiomovei(bp->b_data + blkoffset, xfersize, uio);
+ error = uiomove(bp->b_data + blkoffset, xfersize, uio);
if (error != 0)
memset(bp->b_data + blkoffset, 0, xfersize);
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 4d15c8bc946..efc42ceb5af 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_vnops.c,v 1.124 2016/02/04 12:45:03 mikeb Exp $ */
+/* $OpenBSD: ufs_vnops.c,v 1.125 2016/02/16 17:56:12 stefan Exp $ */
/* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */
/*
@@ -1491,7 +1491,7 @@ ufs_readdir(void *v)
memset(u.dn.d_name + u.dn.d_namlen, 0, u.dn.d_reclen
- u.dn.d_namlen - offsetof(struct dirent, d_name));
- error = uiomovei(&u.dn, u.dn.d_reclen, uio);
+ error = uiomove(&u.dn, u.dn.d_reclen, uio);
dp = (struct direct *)((char *)dp + dp->d_reclen);
}
@@ -1519,12 +1519,12 @@ ufs_readlink(void *v)
struct vop_readlink_args *ap = v;
struct vnode *vp = ap->a_vp;
struct inode *ip = VTOI(vp);
- int isize;
+ u_int64_t isize;
isize = DIP(ip, size);
if (isize < vp->v_mount->mnt_maxsymlinklen ||
(vp->v_mount->mnt_maxsymlinklen == 0 && DIP(ip, blocks) == 0)) {
- return (uiomovei((char *)SHORTLINK(ip), isize, ap->a_uio));
+ return (uiomove((char *)SHORTLINK(ip), isize, ap->a_uio));
}
return (VOP_READ(vp, ap->a_uio, 0, ap->a_cred));
}