diff mbox

[2/2] virtio-console: Notify guest of console size resize

Message ID 1273092606-23099-2-git-send-email-amit.shah@redhat.com
State New
Headers show

Commit Message

Amit Shah May 5, 2010, 8:50 p.m. UTC
From: Kusanagi Kouichi <slash@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 <slash@ac.auone-net.jp>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 hw/virtio-console.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff mbox

Patch

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