提交 1cb6f506 编写于 作者: K Kevin Wolf

block: Allow overriding backing.file.filename

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: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 56d1b4d2
无相关合并请求
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部