Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linprocfs/linprocfs.c
Show First 20 Lines • Show All 1,922 Lines • ▼ Show 20 Lines | linprocfs_doauxv(PFS_FILL_ARGS) | ||||
resid = sbuf_len(asb) - uio->uio_offset; | resid = sbuf_len(asb) - uio->uio_offset; | ||||
if (resid > uio->uio_resid) | if (resid > uio->uio_resid) | ||||
buflen = uio->uio_resid; | buflen = uio->uio_resid; | ||||
else | else | ||||
buflen = resid; | buflen = resid; | ||||
if (buflen > IOSIZE_MAX) | if (buflen > IOSIZE_MAX) | ||||
return (EINVAL); | return (EINVAL); | ||||
if (buflen > MAXPHYS) | if (buflen > maxphys) | ||||
buflen = MAXPHYS; | buflen = maxphys; | ||||
if (resid <= 0) | if (resid <= 0) | ||||
return (0); | return (0); | ||||
if (error == 0) | if (error == 0) | ||||
error = uiomove(sbuf_data(asb) + uio->uio_offset, buflen, uio); | error = uiomove(sbuf_data(asb) + uio->uio_offset, buflen, uio); | ||||
sbuf_delete(asb); | sbuf_delete(asb); | ||||
return (error); | return (error); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines |