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 11f17c8489..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; } - bdrv_set_read_only(bs, 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); |