]> git.proxmox.com Git - qemu.git/commit
iov: add qemu_iovec_concat_iov()
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 22 Nov 2012 15:06:06 +0000 (16:06 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 2 Jan 2013 14:58:09 +0000 (15:58 +0100)
commit530c0bbd73e1b658c9266582072847de1fbdff10
tree0bfc3c86db76b8965464568a1846a26320ab8cc6
parent8962e44fe438a051aff9f43209363f599be33624
iov: add qemu_iovec_concat_iov()

The qemu_iovec_concat() function copies a subset of a QEMUIOVector.  The
new qemu_iovec_concat_iov() function does the same for a iov/cnt pair.

It is easy to define qemu_iovec_concat() in terms of
qemu_iovec_concat_iov().  The existing code is mostly unchanged, except
for the assertion src->size >= soffset, which cannot be efficiently
checked upfront on a iov/cnt pair.  Instead we assert upon hitting the
end of src with an unsatisfied soffset.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/qemu-common.h
iov.c