mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Change the type of uio_resid member of struct uio from int to ssize_t.
Note that this does not actually enable full-range i/o requests for 64 architectures, and is done now to update KBI only. Tested by: pho Reviewed by: jhb, bde (as part of the review of the bigger patch)
This commit is contained in:
parent
2654ae4dfe
commit
9f80ce043d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194990
@ -552,7 +552,7 @@ targwrite(struct cdev *dev, struct uio *uio, int ioflag)
|
||||
softc = (struct targ_softc *)dev->si_drv1;
|
||||
write_len = error = 0;
|
||||
CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH,
|
||||
("write - uio_resid %d\n", uio->uio_resid));
|
||||
("write - uio_resid %zd\n", uio->uio_resid));
|
||||
while (uio->uio_resid >= sizeof(user_ccb) && error == 0) {
|
||||
union ccb *ccb;
|
||||
|
||||
|
@ -322,12 +322,12 @@ so_getbhs(isc_session_t *sp)
|
||||
error = soreceive(sp->soc, NULL, uio, 0, 0, &flags);
|
||||
|
||||
if(error)
|
||||
debug(2, "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd",
|
||||
debug(2, "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd",
|
||||
error,
|
||||
sp->soc->so_error, uio->uio_resid, iov->iov_len);
|
||||
if(!error && (uio->uio_resid > 0)) {
|
||||
error = EPIPE; // was EAGAIN
|
||||
debug(2, "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd so_state=%x",
|
||||
debug(2, "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd so_state=%x",
|
||||
error,
|
||||
sp->soc->so_error, uio->uio_resid, iov->iov_len, sp->soc->so_state);
|
||||
}
|
||||
@ -442,7 +442,7 @@ so_recv(isc_session_t *sp, pduq_t *pq)
|
||||
}
|
||||
mp = NULL;
|
||||
|
||||
sdebug(4, "uio_resid=0x%x itt=0x%x bp=%p bo=%x len=%x/%x",
|
||||
sdebug(4, "uio_resid=0x%zx itt=0x%x bp=%p bo=%x len=%x/%x",
|
||||
uio->uio_resid,
|
||||
ntohl(pq->pdu.ipdu.bhs.itt),
|
||||
csio->data_ptr, ntohl(rcmd->bo), ntohl(cmd->edtlen), pq->pdu.ds_len);
|
||||
|
@ -852,7 +852,7 @@ midi_write(struct cdev *i_dev, struct uio *uio, int ioflag)
|
||||
|
||||
used = MIN(MIDIQ_AVAIL(m->outq), uio->uio_resid);
|
||||
used = MIN(used, MIDI_WSIZE);
|
||||
MIDI_DEBUG(5, printf("midiout: resid %d len %jd avail %jd\n",
|
||||
MIDI_DEBUG(5, printf("midiout: resid %zd len %jd avail %jd\n",
|
||||
uio->uio_resid, (intmax_t)MIDIQ_LEN(m->outq),
|
||||
(intmax_t)MIDIQ_AVAIL(m->outq)));
|
||||
|
||||
|
@ -878,7 +878,7 @@ seq_read(struct cdev *i_dev, struct uio *uio, int ioflag)
|
||||
if (scp == NULL)
|
||||
return ENXIO;
|
||||
|
||||
SEQ_DEBUG(7, printf("seq_read: unit %d, resid %d.\n",
|
||||
SEQ_DEBUG(7, printf("seq_read: unit %d, resid %zd.\n",
|
||||
scp->unit, uio->uio_resid));
|
||||
|
||||
mtx_lock(&scp->seq_lock);
|
||||
@ -936,7 +936,7 @@ seq_read(struct cdev *i_dev, struct uio *uio, int ioflag)
|
||||
retval = 0;
|
||||
err1:
|
||||
mtx_unlock(&scp->seq_lock);
|
||||
SEQ_DEBUG(6, printf("seq_read: ret %d, resid %d.\n",
|
||||
SEQ_DEBUG(6, printf("seq_read: ret %d, resid %zd.\n",
|
||||
retval, uio->uio_resid));
|
||||
|
||||
return retval;
|
||||
@ -950,7 +950,7 @@ seq_write(struct cdev *i_dev, struct uio *uio, int ioflag)
|
||||
int retval;
|
||||
int used;
|
||||
|
||||
SEQ_DEBUG(7, printf("seq_write: unit %d, resid %d.\n",
|
||||
SEQ_DEBUG(7, printf("seq_write: unit %d, resid %zd.\n",
|
||||
scp->unit, uio->uio_resid));
|
||||
|
||||
if (scp == NULL)
|
||||
@ -995,7 +995,7 @@ seq_write(struct cdev *i_dev, struct uio *uio, int ioflag)
|
||||
|
||||
used = MIN(uio->uio_resid, 4);
|
||||
|
||||
SEQ_DEBUG(8, printf("seqout: resid %d len %jd avail %jd\n",
|
||||
SEQ_DEBUG(8, printf("seqout: resid %zd len %jd avail %jd\n",
|
||||
uio->uio_resid, (intmax_t)MIDIQ_LEN(scp->out_q),
|
||||
(intmax_t)MIDIQ_AVAIL(scp->out_q)));
|
||||
|
||||
@ -1115,7 +1115,7 @@ seq_write(struct cdev *i_dev, struct uio *uio, int ioflag)
|
||||
|
||||
err0:
|
||||
SEQ_DEBUG(6,
|
||||
printf("seq_write done: leftover buffer length %d retval %d\n",
|
||||
printf("seq_write done: leftover buffer length %zd retval %d\n",
|
||||
uio->uio_resid, retval));
|
||||
mtx_unlock(&scp->seq_lock);
|
||||
return retval;
|
||||
|
@ -439,7 +439,7 @@ spkrwrite(dev, uio, ioflag)
|
||||
int ioflag;
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("spkrwrite: entering with dev = %s, count = %d\n",
|
||||
printf("spkrwrite: entering with dev = %s, count = %zd\n",
|
||||
devtoname(dev), uio->uio_resid);
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
@ -331,7 +331,7 @@ vc_write(struct cdev *dev, struct uio *uiop, int flag)
|
||||
* Get the rest of the data.
|
||||
*/
|
||||
if (vmp->vm_outSize < uiop->uio_resid) {
|
||||
myprintf(("vcwrite: more data than asked for (%d < %d)\n",
|
||||
myprintf(("vcwrite: more data than asked for (%d < %zd)\n",
|
||||
vmp->vm_outSize, uiop->uio_resid));
|
||||
|
||||
/*
|
||||
|
@ -331,7 +331,7 @@ coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw, int ioflag,
|
||||
int error = 0;
|
||||
|
||||
MARK_ENTRY(CODA_RDWR_STATS);
|
||||
CODADEBUG(CODA_RDWR, myprintf(("coda_rdwr(%d, %p, %d, %lld, %d)\n",
|
||||
CODADEBUG(CODA_RDWR, myprintf(("coda_rdwr(%d, %p, %zd, %lld, %d)\n",
|
||||
rw, (void *)uiop->uio_iov->iov_base, uiop->uio_resid,
|
||||
(long long)uiop->uio_offset, uiop->uio_segflg)););
|
||||
|
||||
@ -1470,7 +1470,7 @@ coda_readdir(struct vop_readdir_args *ap)
|
||||
int opened_internally = 0;
|
||||
|
||||
MARK_ENTRY(CODA_READDIR_STATS);
|
||||
CODADEBUG(CODA_READDIR, myprintf(("coda_readdir(%p, %d, %lld, %d)\n",
|
||||
CODADEBUG(CODA_READDIR, myprintf(("coda_readdir(%p, %zd, %lld, %d)\n",
|
||||
(void *)uiop->uio_iov->iov_base, uiop->uio_resid,
|
||||
(long long)uiop->uio_offset, uiop->uio_segflg)););
|
||||
|
||||
|
@ -622,9 +622,9 @@ pfs_read(struct vop_read_args *va)
|
||||
VOP_UNLOCK(vn, 0);
|
||||
|
||||
if (pn->pn_flags & PFS_RAWRD) {
|
||||
PFS_TRACE(("%lu resid", (unsigned long)uio->uio_resid));
|
||||
PFS_TRACE(("%zd resid", uio->uio_resid));
|
||||
error = pn_fill(curthread, proc, pn, NULL, uio);
|
||||
PFS_TRACE(("%lu resid", (unsigned long)uio->uio_resid));
|
||||
PFS_TRACE(("%zd resid", uio->uio_resid));
|
||||
goto ret;
|
||||
}
|
||||
|
||||
|
@ -934,7 +934,7 @@ tapwrite(struct cdev *dev, struct uio *uio, int flag)
|
||||
return (0);
|
||||
|
||||
if ((uio->uio_resid < 0) || (uio->uio_resid > TAPMRU)) {
|
||||
TAPDEBUG("%s invalid packet len = %d, minor = %#x\n",
|
||||
TAPDEBUG("%s invalid packet len = %zd, minor = %#x\n",
|
||||
ifp->if_xname, uio->uio_resid, dev2unit(dev));
|
||||
|
||||
return (EIO);
|
||||
|
@ -888,7 +888,7 @@ tunwrite(struct cdev *dev, struct uio *uio, int flag)
|
||||
return (0);
|
||||
|
||||
if (uio->uio_resid < 0 || uio->uio_resid > TUNMRU) {
|
||||
TUNDEBUG(ifp, "len=%d!\n", uio->uio_resid);
|
||||
TUNDEBUG(ifp, "len=%zd!\n", uio->uio_resid);
|
||||
return (EIO);
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ struct uio {
|
||||
struct iovec *uio_iov; /* scatter/gather list */
|
||||
int uio_iovcnt; /* length of scatter/gather list */
|
||||
off_t uio_offset; /* offset in target object */
|
||||
int uio_resid; /* remaining bytes to process */
|
||||
ssize_t uio_resid; /* remaining bytes to process */
|
||||
enum uio_seg uio_segflg; /* address space */
|
||||
enum uio_rw uio_rw; /* operation */
|
||||
struct thread *uio_td; /* owner */
|
||||
|
@ -1161,7 +1161,7 @@ vnode_pager_generic_putpages(vp, m, bytecount, flags, rtvals)
|
||||
}
|
||||
if (auio.uio_resid) {
|
||||
if (ppscheck || ppsratecheck(&lastfail, &curfail, 1))
|
||||
printf("vnode_pager_putpages: residual I/O %d at %lu\n",
|
||||
printf("vnode_pager_putpages: residual I/O %zd at %lu\n",
|
||||
auio.uio_resid, (u_long)m[0]->pindex);
|
||||
}
|
||||
for (i = 0; i < ncount; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user