diff options
Diffstat (limited to 'block/cloop.c')
-rw-r--r-- | block/cloop.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/cloop.c b/block/cloop.c index a6c7b9dbe6..d6597fcf78 100644 --- a/block/cloop.c +++ b/block/cloop.c @@ -72,7 +72,10 @@ static int cloop_open(BlockDriverState *bs, QDict *options, int flags, return -EINVAL; } - bs->read_only = true; + ret = bdrv_set_read_only(bs, true, errp); + if (ret < 0) { + return ret; + } /* read header */ ret = bdrv_pread(bs->file, 128, &s->block_size, 4); |