From patchwork Wed May 5 20:50:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 51767 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 57CA6B7D4A for ; Thu, 6 May 2010 09:51:47 +1000 (EST) Received: from localhost ([127.0.0.1]:41549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9oNU-0007E5-HU for incoming@patchwork.ozlabs.org; Wed, 05 May 2010 19:51:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9lZY-0007vZ-G2 for qemu-devel@nongnu.org; Wed, 05 May 2010 16:52:00 -0400 Received: from [140.186.70.92] (port=50914 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9lZW-0007uH-P7 for qemu-devel@nongnu.org; Wed, 05 May 2010 16:51:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9lZS-0001ye-Os for qemu-devel@nongnu.org; Wed, 05 May 2010 16:51:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26036) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9lZS-0001yT-G7 for qemu-devel@nongnu.org; Wed, 05 May 2010 16:51:54 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o45Kpo2q028107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 May 2010 16:51:51 -0400 Received: from localhost (vpn-240-233.phx2.redhat.com [10.3.240.233]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o45Kpnbt016427; Wed, 5 May 2010 16:51:50 -0400 From: Amit Shah To: Anthony Liguori Date: Thu, 6 May 2010 02:20:06 +0530 Message-Id: <1273092606-23099-2-git-send-email-amit.shah@redhat.com> In-Reply-To: <1273092606-23099-1-git-send-email-amit.shah@redhat.com> References: <1273092606-23099-1-git-send-email-amit.shah@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Amit Shah , Kusanagi Kouichi , qemu list Subject: [Qemu-devel] [PATCH 2/2] virtio-console: Notify guest of console size resize X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; } }