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

2012-12-13 Thread Amit Shah
Signed-off-by: Amit Shah 
---
 hw/virtio-serial-bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;
-- 
1.8.0.2




Re: [Qemu-devel] [PATCH 1/4] virtio-serial: use uint32_t to count ports

2012-12-13 Thread Rob Landley
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  
different).


Rob