History | View | Annotate | Download (11.3 kB)
iov: add qemu_iovec_concat_iov()
The qemu_iovec_concat() function copies a subset of a QEMUIOVector. Thenew qemu_iovec_concat_iov() function does the same for a iov/cnt pair.
It is easy to define qemu_iovec_concat() in terms ofqemu_iovec_concat_iov(). The existing code is mostly unchanged, except...
iov: add iov_discard_front/back() to remove data
The iov_discard_front/back() functions remove data from the front orback of the vector. This is useful when peeling off header/footerstructs.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Merge remote-tracking branch 'origin/master' into threadpool
janitor: move iovector functions out of cutils.c
This removes the dependency of cutils.c on iov.c, and lets us removeiov.o from several builds.
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.
iov_send_recv(): Handle zero bytes case even if OS does not
POSIX allows sendmsg() and recvmsg() to fail EMSGSIZE if passed a zeromsg.msg_iovlen (in particular the MacOS X implementation will do this).Handle the case where iov_send_recv() is passed a zero byte count...
iov: Fix do_send_recv() for MinGW (also fixes a build breakage)
Commit 25e5e4c7 broke compilation for non POSIX hosts (e.g. MinGW)because it partially replaced "ret" by "count".
It also changed the handling of EINTR in a wrong way.
The patch restores the old code for these two changes....
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)...
prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
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>