uiomove-related caddr_t -> void * (just the low-hanging fruit)

This commit is contained in:
des 2003-03-02 15:50:23 +00:00
parent 81848f2917
commit 17df8c12f3
17 changed files with 29 additions and 35 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 *

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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 @@ ptcwrite(dev, uio, flag)
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 @@ ptcwrite(dev, uio, flag)
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 */

View File

@ -683,7 +683,7 @@ sosend(so, addr, uio, top, control, flags, td)
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 @@ 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) + 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;

View File

@ -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:

View File

@ -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 = &top;
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) {

View File

@ -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 = &top;
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) {