From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCZ2h-0000Vc-SS for qemu-devel@nongnu.org; Tue, 27 Mar 2012 12:14:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCZ2b-00041C-6O for qemu-devel@nongnu.org; Tue, 27 Mar 2012 12:14:43 -0400 From: Stefano Stabellini Date: Tue, 27 Mar 2012 17:15:31 +0100 Message-ID: <1332864932-1082-1-git-send-email-stefano.stabellini@eu.citrix.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 1/2] xen_console: ignore console disconnect events from console/0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: Stefano Stabellini , qemu-devel@nongnu.org, qemu-stable@nongnu.org The first console has a different location compared to other PV devices (console, rather than device/console/0) and doesn't obey the xenstore state protocol. We already special case the first console in con_init and con_initialise, we should also do it in con_disconnect. Signed-off-by: Stefano Stabellini --- hw/xen_console.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/xen_console.c b/hw/xen_console.c index edcb31c..3794b19 100644 --- a/hw/xen_console.c +++ b/hw/xen_console.c @@ -248,6 +248,9 @@ static void con_disconnect(struct XenDevice *xendev) { struct XenConsole *con = container_of(xendev, struct XenConsole, xendev); + if (!xendev->dev) { + return; + } if (con->chr) qemu_chr_add_handlers(con->chr, NULL, NULL, NULL, NULL); xen_be_unbind_evtchn(&con->xendev); -- 1.7.2.5