aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block.c b/block.c
index e7387f1556..f1ef4b0109 100644
--- a/block.c
+++ b/block.c
@@ -1234,6 +1234,7 @@ int bdrv_open(BlockDriverState **pbs, const char *filename,
ret = bdrv_file_open(bs, filename, &options, flags & ~BDRV_O_PROTOCOL,
&local_err);
if (!ret) {
+ drv = bs->drv;
goto done;
} else if (bs->drv) {
goto close_and_fail;