Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 3160499aacb81f6735941eb4c372d87a > files > 55

kvm-83-164.el5_5.30.src.rpm

From d85affe545cc867935ca6b560da0b9f8290fc183 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Tue, 3 Feb 2009 18:51:14 -0200
Subject: [PATCH 54/54] qemu: drive_init: Don't try to read passwords before monitor setup

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 <ehabkost@redhat.com>
RH-Upstream-status: submitted(qemu-devel)
---
 qemu/vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu/vl.c b/qemu/vl.c
index d77317f..3e068c9 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -2664,7 +2664,7 @@ 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.1