hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argument
The 'is_write' argument is either 0 or 1. Convert it to a boolean type. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
9842a9cfdd
commit
22953364f4
@ -1293,7 +1293,7 @@ static void virtqueue_undo_map_desc(unsigned int out_num, unsigned int in_num,
|
||||
|
||||
static void virtqueue_map_iovec(VirtIODevice *vdev, struct iovec *sg,
|
||||
hwaddr *addr, unsigned int num_sg,
|
||||
int is_write)
|
||||
bool is_write)
|
||||
{
|
||||
unsigned int i;
|
||||
hwaddr len;
|
||||
@ -1317,8 +1317,9 @@ static void virtqueue_map_iovec(VirtIODevice *vdev, struct iovec *sg,
|
||||
|
||||
void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem)
|
||||
{
|
||||
virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, elem->in_num, 1);
|
||||
virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, elem->out_num, 0);
|
||||
virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, elem->in_num, true);
|
||||
virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, elem->out_num,
|
||||
false);
|
||||
}
|
||||
|
||||
static void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num)
|
||||
|
Loading…
Reference in New Issue
Block a user