aboutsummaryrefslogtreecommitdiff
path: root/block/iscsi.c
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2012-06-07 20:21:06 +0400
committerMichael Tokarev <mjt@tls.msk.ru>2012-06-11 23:12:11 +0400
commitd5e6b1619c516fa1e2ee4d8d20f08fcda4fb67a0 (patch)
tree20ea66644af8533a7ce32f51875d50a800e9b7d4 /block/iscsi.c
parent1b093c480a32051cc856b6ab2395d8cbc3ae99da (diff)
downloadqemu-d5e6b1619c516fa1e2ee4d8d20f08fcda4fb67a0.zip
qemu-d5e6b1619c516fa1e2ee4d8d20f08fcda4fb67a0.tar.gz
qemu-d5e6b1619c516fa1e2ee4d8d20f08fcda4fb67a0.tar.bz2
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 'block/iscsi.c')
-rw-r--r--block/iscsi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index 22888a0..ecb7a22 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -240,8 +240,7 @@ iscsi_aio_writev(BlockDriverState *bs, int64_t sector_num,
/* this will allow us to get rid of 'buf' completely */
size = nb_sectors * BDRV_SECTOR_SIZE;
acb->buf = g_malloc(size);
- qemu_iovec_to_buffer(acb->qiov, acb->buf);
-
+ qemu_iovec_to_buf(acb->qiov, 0, acb->buf, size);
acb->task = malloc(sizeof(struct scsi_task));
if (acb->task == NULL) {