From patchwork Tue Jun 15 14:19:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 55693 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 00F0A1007D2 for ; Wed, 16 Jun 2010 01:01:09 +1000 (EST) Received: from localhost ([127.0.0.1]:49236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOXdS-0003ax-Cq for incoming@patchwork.ozlabs.org; Tue, 15 Jun 2010 11:01:06 -0400 Received: from [140.186.70.92] (port=37766 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOWzn-00080x-AJ for qemu-devel@nongnu.org; Tue, 15 Jun 2010 10:20:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOWzl-00007j-Ta for qemu-devel@nongnu.org; Tue, 15 Jun 2010 10:20:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19051) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOWzl-00007X-N7 for qemu-devel@nongnu.org; Tue, 15 Jun 2010 10:20:05 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5FEK2iJ012742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 15 Jun 2010 10:20:03 -0400 Received: from localhost.localdomain (dhcp-5-217.str.redhat.com [10.32.5.217]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5FEJq6t025060; Tue, 15 Jun 2010 10:20:00 -0400 From: Kevin Wolf To: anthony@codemonkey.ws Date: Tue, 15 Jun 2010 16:19:28 +0200 Message-Id: <1276611581-3757-7-git-send-email-kwolf@redhat.com> In-Reply-To: <1276611581-3757-1-git-send-email-kwolf@redhat.com> References: <1276611581-3757-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 06/19] Fix regression for "-drive file=" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Markus Armbruster 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 Signed-off-by: Kevin Wolf --- blockdev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/blockdev.c b/blockdev.c index 642ce75..dbeef09 100644 --- a/blockdev.c +++ b/blockdev.c @@ -462,7 +462,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi, int *fatal_error) case IF_COUNT: abort(); } - if (!file) { + if (!file || !*file) { *fatal_error = 0; return NULL; }