From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2jj6-0003p6-9T for qemu-devel@nongnu.org; Wed, 29 Feb 2012 08:37:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2jiz-00009v-TB for qemu-devel@nongnu.org; Wed, 29 Feb 2012 08:37:51 -0500 Received: from mail-pz0-f45.google.com ([209.85.210.45]:46520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2jiz-000094-K0 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 08:37:45 -0500 Received: by mail-pz0-f45.google.com with SMTP id p14so9255511dad.4 for ; Wed, 29 Feb 2012 05:37:44 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 29 Feb 2012 14:37:25 +0100 Message-Id: <1330522650-15357-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1330522650-15357-1-git-send-email-pbonzini@redhat.com> References: <1330522650-15357-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/6] fix format name for backing file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, fsimonce@redhat.com, eblake@redhat.com, stefanha@linux.vnet.ibm.com, jcody@redhat.com The new image's backing file is the existing image, so we need to take the format from there. Signed-off-by: Paolo Bonzini --- blockdev.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/blockdev.c b/blockdev.c index d78aa51..96a893b 100644 --- a/blockdev.c +++ b/blockdev.c @@ -800,7 +800,8 @@ void qmp_blockdev_group_snapshot_sync(SnapshotDevList *dev_list, /* create new image w/backing file */ ret = bdrv_img_create(snapshot_file, format, states->old_bs->filename, - drv->format_name, NULL, -1, flags); + states->old_bs->drv->format_name, + NULL, -1, flags); if (ret) { error_set(errp, QERR_OPEN_FILE_FAILED, snapshot_file); goto delete_and_fail; -- 1.7.7.6