[1/4] virtio-serial: use uint32_t to count ports

Message ID c3587ca1a25862628e06cc019f91e7b2dcef40bf.1355394885.git.amit.shah@redhat.com
State New
Headers show

Commit Message

Amit Shah Dec. 13, 2012, 10:37 a.m.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
 hw/virtio-serial-bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Rob Landley Dec. 14, 2012, 5:18 a.m. | #1
Speaking of virtio-serial, is there a way to get virtio serial ports to  
attach to qemu's stdin/stdout the way other serial ports can (and which  
is the default with --nographic for conventional serial ports), or do  
you still have to make a magic char device on the host?

I never understood why _using_ virtio serial ports was so different,  
but it's been about a year since I looked at them (because they were so  



diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 155da58..30f450c 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -56,7 +56,7 @@  struct VirtIOSerial {
     struct {
         QEMUTimer *timer;
-        int nr_active_ports;
+        uint32_t nr_active_ports;
         struct {
             VirtIOSerialPort *port;
             uint8_t host_connected;
@@ -637,7 +637,7 @@  static void virtio_serial_save(QEMUFile *f, void *opaque)
 static void virtio_serial_post_load_timer_cb(void *opaque)
-    int i;
+    uint32_t i;
     VirtIOSerial *s = opaque;
     VirtIOSerialPort *port;
     uint8_t host_connected;