From patchwork Tue Oct 11 09:36:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 118893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D4703B6F7C for ; Tue, 11 Oct 2011 20:39:04 +1100 (EST) Received: from localhost ([::1]:37740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDYnc-0007w4-RX for incoming@patchwork.ozlabs.org; Tue, 11 Oct 2011 05:39:00 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDYnS-0007vk-Du for qemu-devel@nongnu.org; Tue, 11 Oct 2011 05:38:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDYnR-0002l4-H0 for qemu-devel@nongnu.org; Tue, 11 Oct 2011 05:38:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDYnR-0002ku-6P for qemu-devel@nongnu.org; Tue, 11 Oct 2011 05:38:49 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9B9cl5u017767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Oct 2011 05:38:48 -0400 Received: from bow.tlv.redhat.com (dhcp-3-73.tlv.redhat.com [10.35.3.73]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9B9ciRe007886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 11 Oct 2011 05:38:47 -0400 Date: Tue, 11 Oct 2011 11:36:16 +0200 From: Alon Levy To: Jan Kiszka Message-ID: <20111011093616.GA32387@bow.tlv.redhat.com> Mail-Followup-To: Jan Kiszka , qemu-devel@nongnu.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] "console: Properly switch consoles for screen dumps" breaks qxl screen dump X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hi Jan, I've recently found the $SUBJECT, it's commit f81bdefb63243e82d16ce49332f7cf74d10b8f27. I'd like to fix it without breaking anything, can you provide me with the test that your original patch fixed? Alon p.s. for a simple command line with a single console (not even sure how to get multiple) the following fixes my problem, I expect it doesn't introduce any problems? diff --git a/console.c b/console.c index 6dfcc47..5a709fe 100644 --- a/console.c +++ b/console.c @@ -1067,6 +1067,10 @@ void console_select(unsigned int index) if (index >= MAX_CONSOLES) return; + if (active_console == consoles[index]) { + fprintf(stderr, "not changing console, not required\n"); + return; + } if (active_console) { active_console->g_width = ds_get_width(active_console->ds); active_console->g_height = ds_get_height(active_console->ds);