]> git.proxmox.com Git - qemu.git/blobdiff - hw/virtio-console.c
virtio-serial: Apps should consume all data that guest sends out / Fix virtio api...
[qemu.git] / hw / virtio-console.c
index bbbb6b86d0e30efb792da81108ccaf09fc24324b..caea11f3a8642d7e6d6f75a91ec2a6354399e8c2 100644 (file)
@@ -20,14 +20,11 @@ typedef struct VirtConsole {
 
 
 /* Callback function that's called when the guest sends us data */
-static size_t flush_buf(VirtIOSerialPort *port, const uint8_t *buf, size_t len)
+static void flush_buf(VirtIOSerialPort *port, const uint8_t *buf, size_t len)
 {
     VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port);
-    ssize_t ret;
 
-    ret = qemu_chr_write(vcon->chr, buf, len);
-
-    return ret < 0 ? 0 : ret;
+    qemu_chr_write(vcon->chr, buf, len);
 }
 
 /* Readiness of the guest to accept data on a port */