aboutsummaryrefslogtreecommitdiff
path: root/block/bochs.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/bochs.c')
-rw-r--r--block/bochs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/block/bochs.c b/block/bochs.c
index bdc28316e7..a759b6eff0 100644
--- a/block/bochs.c
+++ b/block/bochs.c
@@ -110,7 +110,10 @@ static int bochs_open(BlockDriverState *bs, QDict *options, int flags,
return -EINVAL;
}
- bdrv_set_read_only(bs, true); /* no write support yet */
+ ret = bdrv_set_read_only(bs, true, errp); /* no write support yet */
+ if (ret < 0) {
+ return ret;
+ }
ret = bdrv_pread(bs->file, 0, &bochs, sizeof(bochs));
if (ret < 0) {