From: Ryan Harper Subject: [PATCH 0/2] Fix monitor console in curses mode Date: Fri, 22 Aug 2008 13:03:39 -0500 Message-ID: <1219428221-22947-1-git-send-email-ryanh@us.ibm.com> Cc: Ryan Harper , Ian Kirk , carenas@sajinet.com.pe, kvm@vger.kernel.org To: qemu-devel@nongnu.org Return-path: Received: from e35.co.us.ibm.com ([32.97.110.153]:33595 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755303AbYHVSDq (ORCPT ); Fri, 22 Aug 2008 14:03:46 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e35.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m7MI3iXR022939 for ; Fri, 22 Aug 2008 14:03:44 -0400 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m7MI3hrH197548 for ; Fri, 22 Aug 2008 12:03:43 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m7MI3hWT005467 for ; Fri, 22 Aug 2008 12:03:43 -0600 Sender: kvm-owner@vger.kernel.org List-ID: The current curses code doesn't set the initial monitor text console to the size of the terminal and fails to adjust properly after a resize. The attach patches create the initial console based on the size of the terminal instead of defaulting to 80x25, and also hook ensure that text_console_resize events adjust the Textconsole display area so they stay the same size as the curses display. The result is that we no longer see broken output like: QEMU 0.9.1 monitor - type 'help' for more information (qemu) (qemu) (qemu) and you can resize your terminal window and the monitor and serial text consoles adjust properly as well. The second patch is a trivial typo fix in the comments in console.c Comments welcome since I'm new to both curses and qemu console code. Signed-off-by: Ryan Harper