From patchwork Wed May 5 20:50:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] virtio-console: Notify guest of console size resize Date: Wed, 05 May 2010 10:50:06 -0000 From: Amit Shah X-Patchwork-Id: 51767 Message-Id: <1273092606-23099-2-git-send-email-amit.shah@redhat.com> To: Anthony Liguori Cc: Amit Shah , Kusanagi Kouichi , qemu list From: Kusanagi Kouichi When we receive a CHR_EVENT_RESIZE notification, let the guest know of the console size update. Signed-off-by: Kusanagi Kouichi Signed-off-by: Amit Shah --- 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; } }