Skip to contentSkip to conversation

qemu-img rebase: Open new backing file read-only

PATCH New Kevin Wolf 1 participant 1 message Aug 17, 2010

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 qemu-img rebase: Open new backing file read-only

We never write to a backing file, so opening rw is useless. It just means that you can't rebase on top of a file for which you don't have write permissions.

---
 qemu-img.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qemu-img.c +1 -1
index e300f91..d2a978b 100644
@@ -1286,7 +1286,7 @@ static int img_rebase(int argc, char **argv)
         }
 
         bs_new_backing = bdrv_new("new_backing");
-        ret = bdrv_open(bs_new_backing, out_baseimg, BDRV_O_FLAGS | BDRV_O_RDWR,
+        ret = bdrv_open(bs_new_backing, out_baseimg, BDRV_O_FLAGS,
                         new_backing_drv);
         if (ret) {
             error("Could not open new backing file '%s'", out_baseimg);
Signature · 1 line
1.7.2