diff options
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -399,7 +399,7 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags, else open_flags = flags & ~(BDRV_O_FILE | BDRV_O_SNAPSHOT); ret = drv->bdrv_open(bs, filename, open_flags); - if (ret == -EACCES && !(flags & BDRV_O_FILE)) { + if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) { ret = drv->bdrv_open(bs, filename, BDRV_O_RDONLY); bs->read_only = 1; } |