Skip to contentSkip to conversation

Disable fall-back to read-only when cannot open drive's file for read-write

PATCH Superseded Naphtali Sprei 1 participant 1 message Jan 14, 2010

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 Disable fall-back to read-only when cannot open drive's file for read-write

---
 block.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
block.c +0 -4
index cbd72cc..0b4b9ad 100644
@@ -457,10 +457,6 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
         ret = -ENOTSUP;
     } else {
         ret = drv->bdrv_open(bs, filename, open_flags);
-        if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) {
-            ret = drv->bdrv_open(bs, filename, open_flags & ~BDRV_O_RDWR);
-            bs->read_only = 1;
-        }
     }
     if (ret < 0) {
         qemu_free(bs->opaque);
Signature · 1 line
1.6.3.3