summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-08-17 18:58:55 +0200
committerKevin Wolf <kwolf@redhat.com>2010-08-30 18:44:03 +0200
commit271a24e7bf5f9e98b8d6180ed9462719c0e755f9 (patch)
tree23645184ced2ecaf0aa537f861fd270a5953cba9
parent2c1064ed2dd30494e4a5484f4b1a24e9dc24c2b8 (diff)
downloadqemu-271a24e7bf5f9e98b8d6180ed9462719c0e755f9.tar.gz
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. Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit cdbae85169c384d1641aa1ae86cdeefe16285745)
-rw-r--r--qemu-img.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c
index e300f911cb..d2a978b912 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -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);