| 82 | } while (0) |
| 83 | |
| 84 | static void |
| 85 | cuio_copydata(struct uio* uio, int off, int len, caddr_t cp) |
| 86 | { |
| 87 | struct iovec *iov = uio->uio_iov; |
| 88 | int iol = uio->uio_iovcnt; |
| 89 | unsigned count; |
| 90 | |
| 91 | CUIO_SKIP(); |
| 92 | while (len > 0) { |
| 93 | KASSERT(iol >= 0, ("%s: empty", __func__)); |
| 94 | count = min(iov->iov_len - off, len); |
| 95 | bcopy(((caddr_t)iov->iov_base) + off, cp, count); |
| 96 | len -= count; |
| 97 | cp += count; |
| 98 | off = 0; |
| 99 | iol--; |
| 100 | iov++; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | static void |
| 105 | cuio_copyback(struct uio* uio, int off, int len, c_caddr_t cp) |
no test coverage detected