From patchwork Tue May 11 13:36:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fix regression for "-drive file=" X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 52287 Message-Id: To: qemu-devel@nongnu.org Date: Tue, 11 May 2010 15:36:46 +0200 From: Markus Armbruster List-Id: 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; }