diff options
author | Hannes Reinecke <hare@suse.de> | 2011-07-11 15:02:23 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-07-18 16:06:27 +0200 |
commit | 348e7b8dcd1460df4d681105f63dd90bba70496d (patch) | |
tree | 5df2392581adad67c863127448a0e73e8c2ed0b3 /hw | |
parent | 5afc8b3de9a8a472a45d2b980632a15cb7f1e1c3 (diff) |
iov: Update parameter usage in iov_(to|from)_buf()
iov_to_buf() has an 'offset' parameter, iov_from_buf() hasn't.
This patch adds the missing parameter to iov_from_buf().
It also renames the 'offset' parameter to 'iov_off' to
emphasize it's the offset into the iovec and not the buffer.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/virtio-net.c | 2 | ||||
-rw-r--r-- | hw/virtio-serial-bus.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 6997e02dcf..a32cc019b0 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -657,7 +657,7 @@ static ssize_t virtio_net_receive(VLANClientState *nc, const uint8_t *buf, size_ /* copy in packet. ugh */ len = iov_from_buf(sg, elem.in_num, - buf + offset, size - offset); + buf + offset, 0, size - offset); total += len; offset += len; /* If buffers can't be merged, at this point we diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 7f6db7bffe..53c58d0f3f 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -103,7 +103,7 @@ static size_t write_to_port(VirtIOSerialPort *port, } len = iov_from_buf(elem.in_sg, elem.in_num, - buf + offset, size - offset); + buf + offset, 0, size - offset); offset += len; virtqueue_push(vq, &elem, len); |