diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2012-06-07 20:21:06 +0400 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2012-06-11 23:12:11 +0400 |
commit | d5e6b1619c516fa1e2ee4d8d20f08fcda4fb67a0 (patch) | |
tree | 20ea66644af8533a7ce32f51875d50a800e9b7d4 /qemu-common.h | |
parent | 1b093c480a32051cc856b6ab2395d8cbc3ae99da (diff) |
change qemu_iovec_to_buf() to match other to,from_buf functions
It now allows specifying offset within qiov to start from and
amount of bytes to copy. Actual implementation is just a call
to iov_to_buf().
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'qemu-common.h')
-rw-r--r-- | qemu-common.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-common.h b/qemu-common.h index cae7bb6608..056e495f30 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -344,7 +344,8 @@ void qemu_iovec_concat(QEMUIOVector *dst, QEMUIOVector *src, size_t soffset, size_t sbytes); void qemu_iovec_destroy(QEMUIOVector *qiov); void qemu_iovec_reset(QEMUIOVector *qiov); -void qemu_iovec_to_buffer(QEMUIOVector *qiov, void *buf); +size_t qemu_iovec_to_buf(QEMUIOVector *qiov, size_t offset, + void *buf, size_t bytes); size_t qemu_iovec_from_buf(QEMUIOVector *qiov, size_t offset, const void *buf, size_t bytes); size_t qemu_iovec_memset(QEMUIOVector *qiov, size_t offset, |