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

Function copyiniov

freebsd/kern/subr_uio.c:346–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346int
347copyiniov(const struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error)
348{
349 u_int iovlen;
350
351 *iov = NULL;
352 if (iovcnt > UIO_MAXIOV)
353 return (error);
354 iovlen = iovcnt * sizeof (struct iovec);
355 *iov = malloc(iovlen, M_IOV, M_WAITOK);
356 error = copyin(iovp, *iov, iovlen);
357 if (error) {
358 free(*iov, M_IOV);
359 *iov = NULL;
360 }
361 return (error);
362}
363
364int
365copyinuio(const struct iovec *iovp, u_int iovcnt, struct uio **uiop)

Callers 6

osendmsgFunction · 0.70
sys_sendmsgFunction · 0.70
orecvmsgFunction · 0.70
sys_recvmsgFunction · 0.70
sys_sctp_generic_recvmsgFunction · 0.50

Calls 3

mallocFunction · 0.85
freeFunction · 0.70
copyinFunction · 0.50

Tested by

no test coverage detected