virtio-serial: Clean up virtconsole detection
commit2a3d57ce4278dfd898d8b5639ace21fa4a4fb9bd
authorMarkus Armbruster <armbru@redhat.com>
Wed, 25 May 2011 12:21:11 +0000 (25 14:21 +0200)
committerAmit Shah <amit.shah@redhat.com>
Fri, 27 May 2011 10:20:56 +0000 (27 15:50 +0530)
tree0e3871d8821936e28b246af06477910dea74be25
parent5e52e5f903b2648c59030637e1610b32e965d615
virtio-serial: Clean up virtconsole detection

virtio-serial-bus needs to treat "virtconsole" devices specially.  It
uses VirtIOSerialPort member is_console to recognize them.  It gets
its value via property initialization.  Cute hack, except it lets
users mess with it: "-device virtconsole,is_console=0" isn't plugged
into port 0 as it should.

Move the flag to VirtIOSerialPortInfo.  Keep the property for backward
compatibility; its value has no effect.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
hw/virtio-console.c
hw/virtio-serial-bus.c
hw/virtio-serial.h