History | View | Annotate | Download (3.9 kB)
janitor: add guards to headers
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
iov: add iov_cpy
Add API to copy part of iovec safely.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
iov: add const annotation
iov_from_buf does not change iov, make it const.
rename qemu_sendv to iov_send, change proto and move declarations to iov.h
Rename arguments and use size_t for sizes instead of int,from int qemu_sendv(int sockfd, struct iovec *iov, int len, int iov_offset)to ssize_t iov_send(int sockfd, struct iovec *iov,...
export iov_send_recv() and use it in iov_send() and iov_recv()
Rename do_sendv_recvv() to iov_send_recv(), change its last arg(do_send) from int to bool, export it in iov.h, and made the twocallers of it (iov_send() and iov_recv()) to be trivial #defines...
rewrite iov_send_recv() and move it to iov.c
Make it much more understandable, add a missingiov_cnt argument (number of iovs in the iov), andadd comments to it.
The new implementation has been extensively testedby splitting a large buffer into many small...
rewrite iov_* functions
This changes implementations of all iov_*functions, completing the previous step.
All iov_* functions now ensure that this offsetargument is within the iovec (using assertion),but lets to specify `bytes' value larger thanactual length of the iovec - in this case they...
change iov_* function prototypes to be more appropriate
Reorder arguments to be more natural, readable andconsistent with other iov_* functions, and changeargument names, from: iov_from_buf(iov, iov_cnt, buf, iov_off, size)to iov_from_buf(iov, iov_cnt, offset, buf, bytes)...
Add iov_hexdump()
Useful for debugging purposes.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Add iov_clear()
Fill the spefified area with zeros.
iov: Update parameter usage in iov_(to|from)_buf()
iov_to_buf() has an 'offset' parameter, iov_from_buf() hasn't.This patch adds the missing parameter to iov_from_buf().It also renames the 'offset' parameter to 'iov_off' toemphasize it's the offset into the iovec and not the buffer....
iov: Move from hw/ to topdir
The iov functions can be useful to other code as well.
Signed-off-by: Amit Shah <amit.shah@redhat.com>CC: Christoph Hellwig <hch@lst.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>