diff options
-rw-r--r-- | blockdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c index 0d20460f0..0858de182 100644 --- a/blockdev.c +++ b/blockdev.c @@ -535,6 +535,8 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) devname, mediastr, unit_id); } dinfo->bdrv = bdrv_new(dinfo->id); + dinfo->bdrv->open_flags = snapshot ? BDRV_O_SNAPSHOT : 0; + dinfo->bdrv->read_only = ro; dinfo->devaddr = devaddr; dinfo->type = type; dinfo->bus = bus_id; |