summaryrefslogtreecommitdiff
path: root/hw/virtio-net.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2011-07-11 15:02:23 +0200
committerKevin Wolf <kwolf@redhat.com>2011-07-18 16:06:27 +0200
commit348e7b8dcd1460df4d681105f63dd90bba70496d (patch)
tree5df2392581adad67c863127448a0e73e8c2ed0b3 /hw/virtio-net.c
parent5afc8b3de9a8a472a45d2b980632a15cb7f1e1c3 (diff)
downloadqemu-348e7b8dcd1460df4d681105f63dd90bba70496d.tar.gz
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/virtio-net.c')
-rw-r--r--hw/virtio-net.c2
1 files changed, 1 insertions, 1 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