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>
This commit is contained in:
Hannes Reinecke 2011-07-11 15:02:23 +02:00 committed by Kevin Wolf
parent 5afc8b3de9
commit 348e7b8dcd
4 changed files with 44 additions and 39 deletions

View file

@ -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