diff options
Diffstat (limited to 'block/qcow.c')
-rw-r--r-- | block/qcow.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/block/qcow.c b/block/qcow.c index 4534515db9..038b05ab1b 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -106,6 +106,12 @@ static int qcow_open(BlockDriverState *bs, QDict *options, int flags, QCowHeader header; Error *local_err = NULL; + bs->file = bdrv_open_child(NULL, options, "file", bs, &child_file, + false, errp); + if (!bs->file) { + return -EINVAL; + } + ret = bdrv_pread(bs->file, 0, &header, sizeof(header)); if (ret < 0) { goto fail; |