aboutsummaryrefslogtreecommitdiff
path: root/hw/block/onenand.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/block/onenand.c')
-rw-r--r--hw/block/onenand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index 579a73d7f7..afc0cd3a0f 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -797,7 +797,7 @@ static void onenand_realize(DeviceState *dev, Error **errp)
s->image = memset(g_malloc(size + (size >> 5)),
0xff, size + (size >> 5));
} else {
- if (blk_is_read_only(s->blk)) {
+ if (!blk_supports_write_perm(s->blk)) {
error_setg(errp, "Can't use a read-only drive");
return;
}