diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-28 17:46:10 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-28 17:46:10 +0000 |
commit | 522584a57bccbb78ea14799263f50730d4dc8583 (patch) | |
tree | 56bc7795752ae34a20251785ae0f8b71b91d8d6c /qemu-common.h | |
parent | cef3017cd7c0d63a12ff743e1e72caf49779c493 (diff) |
add qemu_iovec_init_external (Christoph Hellwig)
Allow to initialize a QEMUIOVector from an externally allocated iovec.
qiov->nalloc is initialized to -1 to indicate external storage for qiov->iov
and all functions dealing with memory management assert on the iovec beeing
an internally managed first.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6902 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-common.h')
-rw-r--r-- | qemu-common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-common.h b/qemu-common.h index 28f47918dc..c10043db7b 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -194,6 +194,7 @@ typedef struct QEMUIOVector { } QEMUIOVector; void qemu_iovec_init(QEMUIOVector *qiov, int alloc_hint); +void qemu_iovec_init_external(QEMUIOVector *qiov, struct iovec *iov, int niov); void qemu_iovec_add(QEMUIOVector *qiov, void *base, size_t len); void qemu_iovec_destroy(QEMUIOVector *qiov); void qemu_iovec_reset(QEMUIOVector *qiov); |