aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-19 16:18:04 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-19 16:18:04 +0100
commit6baa963f4dcc211801608ebe1e0482b51653350c (patch)
tree5b3a7e2086b888c13cea4dafc8c18711f7302835 /util
parent9f6f7f1a85b118ba129620e12bd423a135c8f231 (diff)
parent91d670fbf9945ca4ecbd123affb36889e7fe8a5d (diff)
Merge remote-tracking branch 'remotes/bonzini/scsi-next' into staging
* remotes/bonzini/scsi-next: virtio-scsi: define dummy handle_output for vhost-scsi vqs block/iscsi: drop obsolete pointers from iscsi_co_writev block/iscsi: fix init value for iTask->retries block/iscsi: bump libiscsi requirement to 1.9.0 virtio-scsi: add support for the any_layout feature virtio-scsi: introduce virtio_scsi_complete_cmd_req virtio-scsi: prepare sense data handling for any_layout virtio-scsi: add extra argument and return type to qemu_sgl_concat virtio-scsi: add target swap for VirtIOSCSICtrlTMFReq fields virtio-scsi: start preparing for any_layout util: add return value to qemu_iovec_concat_iov megasas: use PCI DMA API scsi: Print command name in debug scsi-disk: fix bug in scsi_block_new_request() introduced by commit 137745c scsi-disk.c: Fix compilation with -DDEBUG_SCSI block/iscsi: use 16 byte CDBs only when necessary block/iscsi: fix potential segfault on early callback block/iscsi: handle BUSY condition Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r--util/iov.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/util/iov.c b/util/iov.c
index 49f88388f8..2b4f46da75 100644
--- a/util/iov.c
+++ b/util/iov.c
@@ -295,15 +295,15 @@ void qemu_iovec_add(QEMUIOVector *qiov, void *base, size_t len)
* of src".
* Only vector pointers are processed, not the actual data buffers.
*/
-void qemu_iovec_concat_iov(QEMUIOVector *dst,
- struct iovec *src_iov, unsigned int src_cnt,
- size_t soffset, size_t sbytes)
+size_t qemu_iovec_concat_iov(QEMUIOVector *dst,
+ struct iovec *src_iov, unsigned int src_cnt,
+ size_t soffset, size_t sbytes)
{
int i;
size_t done;
if (!sbytes) {
- return;
+ return 0;
}
assert(dst->nalloc != -1);
for (i = 0, done = 0; done < sbytes && i < src_cnt; i++) {
@@ -317,6 +317,8 @@ void qemu_iovec_concat_iov(QEMUIOVector *dst,
}
}
assert(soffset == 0); /* offset beyond end of src */
+
+ return done;
}
/*