mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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:
parent
5afc8b3de9
commit
348e7b8dcd
4 changed files with 44 additions and 39 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue