aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-console.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/virtio-console.c')
-rw-r--r--hw/virtio-console.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/virtio-console.c b/hw/virtio-console.c
index 92455c850f..b263281d8f 100644
--- a/hw/virtio-console.c
+++ b/hw/virtio-console.c
@@ -38,8 +38,10 @@ static void virtio_console_handle_output(VirtIODevice *vdev, VirtQueue *vq)
ssize_t len = 0;
int d;
- for (d=0; d < elem.out_num; d++)
- len += qemu_chr_write(s->chr, elem.out_sg[d].iov_base,elem.out_sg[d].iov_len);
+ for (d = 0; d < elem.out_num; d++) {
+ len += qemu_chr_write(s->chr, (uint8_t *)elem.out_sg[d].iov_base,
+ elem.out_sg[d].iov_len);
+ }
virtqueue_push(vq, &elem, len);
virtio_notify(vdev, vq);
}