diff options
author | des <des@FreeBSD.org> | 2003-03-02 15:50:23 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-03-02 15:50:23 +0000 |
commit | 765ebc59b49b789f220d5975fee1fafe86545825 (patch) | |
tree | 766aa4287191c9a533e33cf6294817571b513579 | |
parent | 8ebe566c39e599ebbb91bc2ea8c7c2fc0c455ace (diff) | |
download | FreeBSD-src-765ebc59b49b789f220d5975fee1fafe86545825.zip FreeBSD-src-765ebc59b49b789f220d5975fee1fafe86545825.tar.gz |
uiomove-related caddr_t -> void * (just the low-hanging fruit)
-rw-r--r-- | sys/compat/linux/linux_ioctl.c | 3 | ||||
-rw-r--r-- | sys/fs/cd9660/cd9660_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 2 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vnops.c | 6 | ||||
-rw-r--r-- | sys/fs/nwfs/nwfs_io.c | 2 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_io.c | 4 | ||||
-rw-r--r-- | sys/fs/udf/udf_vnops.c | 4 | ||||
-rw-r--r-- | sys/gnu/ext2fs/ext2_lookup.c | 3 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_lookup.c | 3 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vnops.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_log.c | 2 | ||||
-rw-r--r-- | sys/kern/tty_pty.c | 7 | ||||
-rw-r--r-- | sys/kern/uipc_socket.c | 10 | ||||
-rw-r--r-- | sys/net/bpf.c | 4 | ||||
-rw-r--r-- | sys/net/if_tap.c | 4 | ||||
-rw-r--r-- | sys/net/if_tun.c | 4 |
17 files changed, 29 insertions, 35 deletions
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 9f10ba5..cb1cbbd 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -2024,8 +2024,7 @@ linux_ifconf(struct thread *td, struct ifconf *uifc) memcpy(ifr.ifr_addr.sa_data, sa->sa_data, sizeof(ifr.ifr_addr.sa_data)); - error = uiomove((caddr_t)&ifr, sizeof ifr, - &uio); + error = uiomove(&ifr, sizeof ifr, &uio); if (error != 0) { IFNET_RUNLOCK(); return (error); diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 0b892e6..b496c5f 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -361,7 +361,7 @@ iso_uiodir(idp,dp,off) --idp->ncookies; } - if ((error = uiomove((caddr_t) dp,dp->d_reclen,idp->uio)) != 0) + if ((error = uiomove(dp, dp->d_reclen, idp->uio)) != 0) return (error); idp->uio_off = off; return (0); diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 6b6683a..81cf8df 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -599,7 +599,7 @@ devfs_readdir(ap) dp->d_fileno = de->de_inode; if (off >= uio->uio_offset) { ncookies++; - error = uiomove((caddr_t)dp, dp->d_reclen, uio); + error = uiomove(dp, dp->d_reclen, uio); if (error) break; } diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 2225220..527987b 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -476,7 +476,7 @@ fdesc_readdir(ap) * And ship to userland */ FILEDESC_UNLOCK(fdp); - error = uiomove((caddr_t) dp, UIO_MX, uio); + error = uiomove(dp, UIO_MX, uio); if (error) goto done; FILEDESC_LOCK(fdp); diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index c92c83a..3d439d3 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1545,8 +1545,7 @@ msdosfs_readdir(ap) dirbuf.d_reclen = GENERIC_DIRSIZ(&dirbuf); if (uio->uio_resid < dirbuf.d_reclen) goto out; - error = uiomove((caddr_t) &dirbuf, - dirbuf.d_reclen, uio); + error = uiomove(&dirbuf, dirbuf.d_reclen, uio); if (error) goto out; offset += sizeof(struct direntry); @@ -1668,8 +1667,7 @@ msdosfs_readdir(ap) brelse(bp); goto out; } - error = uiomove((caddr_t) &dirbuf, - dirbuf.d_reclen, uio); + error = uiomove(&dirbuf, dirbuf.d_reclen, uio); if (error) { brelse(bp); goto out; diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c index f1cd83c..cca1c2e 100644 --- a/sys/fs/nwfs/nwfs_io.c +++ b/sys/fs/nwfs/nwfs_io.c @@ -146,7 +146,7 @@ nwfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) { error = 0; break; } - if ((error = uiomove((caddr_t)&dp, DE_SIZE, uio))) + if ((error = uiomove(&dp, DE_SIZE, uio))) break; } diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index 9aa4224..11c1e3c 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -109,7 +109,7 @@ smbfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) de.d_name[1] = '.'; de.d_name[offset + 1] = '\0'; de.d_type = DT_DIR; - error = uiomove((caddr_t)&de, DE_SIZE, uio); + error = uiomove(&de, DE_SIZE, uio); if (error) return error; offset++; @@ -165,7 +165,7 @@ smbfs_readvdir(struct vnode *vp, struct uio *uio, struct ucred *cred) vput(newvp); } } - error = uiomove((caddr_t)&de, DE_SIZE, uio); + error = uiomove(&de, DE_SIZE, uio); if (error) break; } diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index 8d9be57..c5d8d36 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -406,7 +406,7 @@ udf_read(struct vop_read_args *a) error = udf_readatoffset(node, &size, offset, &bp, &data); if (error) return (error); - error = uiomove((caddr_t)data, size, uio); + error = uiomove(data, size, uio); if (bp != NULL) brelse(bp); if (error) @@ -524,7 +524,7 @@ udf_uiodir(struct udf_uiodir *uiodir, int de_size, struct uio *uio, long cookie) return (-1); } - return (uiomove((caddr_t)uiodir->dirent, de_size, uio)); + return (uiomove(uiodir->dirent, de_size, uio)); } static struct udf_dirstream * diff --git a/sys/gnu/ext2fs/ext2_lookup.c b/sys/gnu/ext2fs/ext2_lookup.c index 49caccf..bba9e4b 100644 --- a/sys/gnu/ext2fs/ext2_lookup.c +++ b/sys/gnu/ext2fs/ext2_lookup.c @@ -222,8 +222,7 @@ ext2_readdir(ap) dp = (struct ext2_dir_entry_2 *) ((char *)dp + dp->rec_len); error = - uiomove((caddr_t)&dstdp, - dstdp.d_reclen, uio); + uiomove(&dstdp, dstdp.d_reclen, uio); if (!error) ncookies++; } else diff --git a/sys/gnu/fs/ext2fs/ext2_lookup.c b/sys/gnu/fs/ext2fs/ext2_lookup.c index 49caccf..bba9e4b 100644 --- a/sys/gnu/fs/ext2fs/ext2_lookup.c +++ b/sys/gnu/fs/ext2fs/ext2_lookup.c @@ -222,8 +222,7 @@ ext2_readdir(ap) dp = (struct ext2_dir_entry_2 *) ((char *)dp + dp->rec_len); error = - uiomove((caddr_t)&dstdp, - dstdp.d_reclen, uio); + uiomove(&dstdp, dstdp.d_reclen, uio); if (!error) ncookies++; } else diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 0b892e6..b496c5f 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -361,7 +361,7 @@ iso_uiodir(idp,dp,off) --idp->ncookies; } - if ((error = uiomove((caddr_t) dp,dp->d_reclen,idp->uio)) != 0) + if ((error = uiomove(dp, dp->d_reclen, idp->uio)) != 0) return (error); idp->uio_off = off; return (0); diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c index 7129310..9969fb1 100644 --- a/sys/kern/subr_log.c +++ b/sys/kern/subr_log.c @@ -151,7 +151,7 @@ logread(dev_t dev, struct uio *uio, int flag) l = imin(l, uio->uio_resid); if (l == 0) break; - error = uiomove((caddr_t)msgbufp->msg_ptr + mbp->msg_bufr, + error = uiomove((char *)msgbufp->msg_ptr + mbp->msg_bufr, l, uio); if (error) break; diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 098108c..94923be 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -425,8 +425,7 @@ ptcread(dev, uio, flag) if (pti->pt_send & TIOCPKT_IOCTL) { cc = min(uio->uio_resid, sizeof(tp->t_termios)); - uiomove((caddr_t)&tp->t_termios, cc, - uio); + uiomove(&tp->t_termios, cc, uio); } pti->pt_send = 0; return (0); @@ -561,7 +560,7 @@ again: cc = min(uio->uio_resid, BUFSIZ); cc = min(cc, TTYHOG - 1 - tp->t_canq.c_cc); cp = locbuf; - error = uiomove((caddr_t)cp, cc, uio); + error = uiomove(cp, cc, uio); if (error) return (error); /* check again for safety */ @@ -596,7 +595,7 @@ again: if (cc == 0) { cc = min(uio->uio_resid, BUFSIZ); cp = locbuf; - error = uiomove((caddr_t)cp, cc, uio); + error = uiomove(cp, cc, uio); if (error) return (error); /* check again for safety */ diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index c9912bf..85ea572 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -683,7 +683,7 @@ nopages: error = 0; else #endif /* ZERO_COPY_SOCKETS */ - error = uiomove(mtod(m, caddr_t), (int)len, uio); + error = uiomove(mtod(m, void *), (int)len, uio); resid = uio->uio_resid; m->m_len = len; *mp = m; @@ -809,13 +809,13 @@ soreceive(so, psa, uio, mp0, controlp, flagsp) if (uio->uio_offset == -1) uio->uio_offset =IDX_TO_OFF(pg->pindex); - error = uiomoveco(mtod(m, caddr_t), + error = uiomoveco(mtod(m, void *), min(uio->uio_resid, m->m_len), uio, pg->object, disposable); } else #endif /* ZERO_COPY_SOCKETS */ - error = uiomove(mtod(m, caddr_t), + error = uiomove(mtod(m, void *), (int) min(uio->uio_resid, m->m_len), uio); m = m_free(m); } while (uio->uio_resid && error == 0 && m); @@ -987,12 +987,12 @@ dontblock: if (uio->uio_offset == -1) uio->uio_offset =IDX_TO_OFF(pg->pindex); - error = uiomoveco(mtod(m, caddr_t) + moff, + error = uiomoveco(mtod(m, char *) + moff, (int)len, uio,pg->object, disposable); } else #endif /* ZERO_COPY_SOCKETS */ - error = uiomove(mtod(m, caddr_t) + moff, (int)len, uio); + error = uiomove(mtod(m, char *) + moff, (int)len, uio); s = splnet(); if (error) goto release; diff --git a/sys/net/bpf.c b/sys/net/bpf.c index df210e2..7c56ef6 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -228,11 +228,11 @@ bpf_movein(uio, linktype, mp, sockp, datlen) #else m->m_off += hlen; #endif - error = uiomove((caddr_t)sockp->sa_data, hlen, uio); + error = uiomove(sockp->sa_data, hlen, uio); if (error) goto bad; } - error = uiomove(mtod(m, caddr_t), len - hlen, uio); + error = uiomove(mtod(m, void *), len - hlen, uio); if (!error) return (0); bad: diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index ee7124a..7c93412 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -794,7 +794,7 @@ tapread(dev, uio, flag) if (len == 0) break; - error = uiomove(mtod(m, caddr_t), len, uio); + error = uiomove(mtod(m, void *), len, uio); m = m_free(m); } @@ -848,7 +848,7 @@ tapwrite(dev, uio, flag) mp = ⊤ while ((error == 0) && (uio->uio_resid > 0)) { m->m_len = min(mlen, uio->uio_resid); - error = uiomove(mtod(m, caddr_t), m->m_len, uio); + error = uiomove(mtod(m, void *), m->m_len, uio); *mp = m; mp = &m->m_next; if (uio->uio_resid > 0) { diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 4de15ec..9de302f 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -676,7 +676,7 @@ tunread(dev_t dev, struct uio *uio, int flag) while (m && uio->uio_resid > 0 && error == 0) { len = min(uio->uio_resid, m->m_len); if (len != 0) - error = uiomove(mtod(m, caddr_t), len, uio); + error = uiomove(mtod(m, void *), len, uio); m = m_free(m); } @@ -725,7 +725,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag) mp = ⊤ while (error == 0 && uio->uio_resid > 0) { m->m_len = min(mlen, uio->uio_resid); - error = uiomove(mtod (m, caddr_t), m->m_len, uio); + error = uiomove(mtod(m, void *), m->m_len, uio); *mp = m; mp = &m->m_next; if (uio->uio_resid > 0) { |