Received: from [140.186.70.92] (port=39592 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBpdn-0005r6-93 for qemu-devel@nongnu.org; Tue, 11 May 2010 09:36:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBpdj-0006EF-P3 for qemu-devel@nongnu.org; Tue, 11 May 2010 09:36:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31330) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBpdj-0006Du-Ga for qemu-devel@nongnu.org; Tue, 11 May 2010 09:36:51 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4BDaoA8021044 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 May 2010 09:36:50 -0400 Received: from blackfin.pond.sub.org (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4BDalsb022628 for ; Tue, 11 May 2010 09:36:48 -0400 From: Markus Armbruster Date: Tue, 11 May 2010 15:36:46 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] [PATCH] Fix regression for "-drive file=" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Empty file used to create an empty drive (no media). Since commit 9dfd7c7a, it's an error: "qemu: could not open disk image : No such file or directory". Older versions of libvirt can choke on this. Signed-off-by: Markus Armbruster --- If this goes in, I'll prepare a patch for stable as well. vl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 85bcc84..78ec1b2 100644 --- a/vl.c +++ b/vl.c @@ -1097,7 +1097,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque, case IF_COUNT: abort(); } - if (!file) { + if (!file || !*file) { *fatal_error = 0; return NULL; } -- 1.6.6.1