From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LVXwv-0001jq-2Q for qemu-devel@nongnu.org; Fri, 06 Feb 2009 16:09:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LVXws-0001i2-4e for qemu-devel@nongnu.org; Fri, 06 Feb 2009 16:09:19 -0500 Received: from [199.232.76.173] (port=51590 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVXwr-0001h5-S5 for qemu-devel@nongnu.org; Fri, 06 Feb 2009 16:09:17 -0500 Received: from mx2.redhat.com ([66.187.237.31]:54574) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LVXwq-0007nu-Np for qemu-devel@nongnu.org; Fri, 06 Feb 2009 16:09:17 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n16L9D62001150 for ; Fri, 6 Feb 2009 16:09:13 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n16L9D3v029472 for ; Fri, 6 Feb 2009 16:09:13 -0500 Received: from blackpad.localdomain (vpn-10-11.bos.redhat.com [10.16.10.11]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n16L9Cvd014584 for ; Fri, 6 Feb 2009 16:09:13 -0500 From: Eduardo Habkost Date: Fri, 6 Feb 2009 19:08:53 -0200 Message-Id: <1233954540-4754-3-git-send-email-ehabkost@redhat.com> In-Reply-To: <1233954540-4754-1-git-send-email-ehabkost@redhat.com> References: <1233954540-4754-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 2/9] drive_init: Don't try to read passwords before monitor setup Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org drive_init() calls qemu_key_check(), but it doesn't make sense to call it before the monitor was set up. This makes qemu hang forever waiting for a password on a monitor that doesn't exist. Removing that call will make the password to be read at a proper time, at read_passwords(). Signed-off-by: Eduardo Habkost --- vl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index aff2b2c..d3ec724 100644 --- a/vl.c +++ b/vl.c @@ -2548,7 +2548,7 @@ static int drive_init(struct drive_opt *arg, int snapshot, bdrv_flags |= BDRV_O_CACHE_WB; else if (cache == 3) /* not specified */ bdrv_flags |= BDRV_O_CACHE_DEF; - if (bdrv_open2(bdrv, file, bdrv_flags, drv) < 0 || qemu_key_check(bdrv, file)) { + if (bdrv_open2(bdrv, file, bdrv_flags, drv) < 0) { fprintf(stderr, "qemu: could not open disk image %s\n", file); return -1; -- 1.6.0.2.GIT