Patchwork [RFT,4/5] virtio-console: Use exitfn for virtserialport, too

login
register
mail settings
Submitter Andreas Färber
Date June 7, 2013, 6:18 p.m.
Message ID <1370629140-30841-5-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/249784/
State New
Headers show

Comments

Andreas Färber - June 7, 2013, 6:18 p.m.
virtconsole and virtserialport are identical in every other aspect
except for the distinguishing VirtIOSerialPortClass::is_console field.

Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/char/virtio-console.c | 1 +
 1 file changed, 1 insertion(+)
Andreas Färber - July 29, 2013, 11:25 p.m.
Michael, Anthony,

Am 07.06.2013 20:18, schrieb Andreas Färber:
> virtconsole and virtserialport are identical in every other aspect
> except for the distinguishing VirtIOSerialPortClass::is_console field.
> 
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  hw/char/virtio-console.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c
> index 7b1a382..73e18f2 100644
> --- a/hw/char/virtio-console.c
> +++ b/hw/char/virtio-console.c
> @@ -192,6 +192,7 @@ static void virtserialport_class_init(ObjectClass *klass, void *data)
>      VirtIOSerialPortClass *k = VIRTIO_SERIAL_PORT_CLASS(klass);
>  
>      k->init = virtconsole_initfn;
> +    k->exit = virtconsole_exitfn;
>      k->have_data = flush_buf;
>      k->set_guest_connected = set_guest_connected;
>      dc->props = virtserialport_properties;

Ping! Is this a fix we should get into 1.6? Or does it not matter in
practice for some reason?

Regards,
Andreas

Patch

diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c
index 7b1a382..73e18f2 100644
--- a/hw/char/virtio-console.c
+++ b/hw/char/virtio-console.c
@@ -192,6 +192,7 @@  static void virtserialport_class_init(ObjectClass *klass, void *data)
     VirtIOSerialPortClass *k = VIRTIO_SERIAL_PORT_CLASS(klass);
 
     k->init = virtconsole_initfn;
+    k->exit = virtconsole_exitfn;
     k->have_data = flush_buf;
     k->set_guest_connected = set_guest_connected;
     dc->props = virtserialport_properties;