From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUEyn-0004sZ-1S for qemu-devel@nongnu.org; Mon, 22 Apr 2013 07:32:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUEyl-0002C3-Qv for qemu-devel@nongnu.org; Mon, 22 Apr 2013 07:32:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUEyl-0002BI-J1 for qemu-devel@nongnu.org; Mon, 22 Apr 2013 07:32:15 -0400 From: Kevin Wolf Date: Mon, 22 Apr 2013 13:31:33 +0200 Message-Id: <1366630294-18984-20-git-send-email-kwolf@redhat.com> In-Reply-To: <1366630294-18984-1-git-send-email-kwolf@redhat.com> References: <1366630294-18984-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 19/20] block: Allow overriding backing.file.filename List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org If a filename is passed in the driver-specific options from the command line, the backing file path from the image is ignored now. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 6e07f45..819eb4e 100644 --- a/block.c +++ b/block.c @@ -889,7 +889,9 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict *options) } bs->open_flags &= ~BDRV_O_NO_BACKING; - if (bs->backing_file[0] == '\0' && qdict_size(options) == 0) { + if (qdict_haskey(options, "file.filename")) { + backing_filename[0] = '\0'; + } else if (bs->backing_file[0] == '\0' && qdict_size(options) == 0) { QDECREF(options); return 0; } -- 1.8.1.4