提交 2258e3fe 编写于 作者: M Max Reitz 提交者: Kevin Wolf

block: Pass reference to bdrv_file_open()

With that now being possible, bdrv_open() should try to extract a block
device reference from the options and pass it to bdrv_file_open().
Signed-off-by: NMax Reitz <mreitz@redhat.com>
Reviewed-by: NKevin Wolf <kwolf@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 72daa72e
......@@ -1056,6 +1056,7 @@ int bdrv_open(BlockDriverState *bs, const char *filename, QDict *options,
char tmp_filename[PATH_MAX + 1];
BlockDriverState *file = NULL;
QDict *file_options = NULL;
const char *file_reference;
const char *drvname;
Error *local_err = NULL;
......@@ -1142,9 +1143,11 @@ int bdrv_open(BlockDriverState *bs, const char *filename, QDict *options,
}
qdict_extract_subqdict(options, &file_options, "file.");
file_reference = qdict_get_try_str(options, "file");
ret = bdrv_file_open(&file, filename, NULL, file_options,
ret = bdrv_file_open(&file, filename, file_reference, file_options,
bdrv_open_flags(bs, flags | BDRV_O_UNMAP), &local_err);
qdict_del(options, "file");
if (ret < 0) {
goto fail;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册