From: Kusanagi Kouichi <sl...@ac.auone-net.jp>

When we receive a CHR_EVENT_RESIZE notification, let the guest know of
the console size update.

Signed-off-by: Kusanagi Kouichi <sl...@ac.auone-net.jp>
Signed-off-by: Amit Shah <amit.s...@redhat.com>
---
 hw/virtio-console.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hw/virtio-console.c b/hw/virtio-console.c
index caea11f..58246d1 100644
--- a/hw/virtio-console.c
+++ b/hw/virtio-console.c
@@ -55,6 +55,9 @@ static void chr_event(void *opaque, int event)
     case CHR_EVENT_CLOSED:
         virtio_serial_close(&vcon->port);
         break;
+    case CHR_EVENT_RESIZE:
+        virtio_serial_resize_console(&vcon->port, vcon->chr->rows, 
vcon->chr->cols);
+        break;
     }
 }
 
-- 
1.6.2.5



Reply via email to