MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cuio_copyback

Function cuio_copyback

freebsd/opencrypto/criov.c:104–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104static void
105cuio_copyback(struct uio* uio, int off, int len, c_caddr_t cp)
106{
107 struct iovec *iov = uio->uio_iov;
108 int iol = uio->uio_iovcnt;
109 unsigned count;
110
111 CUIO_SKIP();
112 while (len > 0) {
113 KASSERT(iol >= 0, ("%s: empty", __func__));
114 count = min(iov->iov_len - off, len);
115 bcopy(cp, ((caddr_t)iov->iov_base) + off, count);
116 len -= count;
117 cp += count;
118 off = 0;
119 iol--;
120 iov++;
121 }
122}
123
124/*
125 * Return the index and offset of location in iovec list.

Callers 1

crypto_copybackFunction · 0.85

Calls 1

minFunction · 0.85

Tested by

no test coverage detected