From 1d4e32079280eeb16e1d2656622d2603aec6f7a3 Mon Sep 17 00:00:00 2001 From: Naphtali Sprei <nsprei@redhat.com> Date: Thu, 6 May 2010 16:37:35 -0300 Subject: [PATCH] qemu-img: open file to be rebased with read-write permission RH-Author: Naphtali Sprei <nsprei@redhat.com> Message-id: <4BE2F04F.2060306@redhat.com> Patchwork-id: 9066 O-Subject: [RHEL-5.6 KVM PATCH] qemu-img: open file to be rebased with read-write permission Bugzilla: 587605 RH-Acked-by: Christoph Hellwig <chellwig@redhat.com> RH-Acked-by: Juan Quintela <quintela@redhat.com> RH-Acked-by: Kevin Wolf <kwolf@redhat.com> BZ: https://bugzilla.redhat.com/show_bug.cgi?id=587605 upstream commit: none, this is a fix to a missed backport Open with read-write permission the file to be modified Signed-off-by: Naphtali Sprei <nsprei@redhat.com> --- qemu/qemu-img.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- qemu/qemu-img.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu/qemu-img.c b/qemu/qemu-img.c index e413716..5c8351c 100644 --- a/qemu/qemu-img.c +++ b/qemu/qemu-img.c @@ -1050,7 +1050,7 @@ static int img_rebase(int argc, char **argv) } } - flags = BRDV_O_FLAGS | (unsafe ? BDRV_O_NO_BACKING : 0); + flags = BRDV_O_FLAGS | BDRV_O_RDWR | (unsafe ? BDRV_O_NO_BACKING : 0); if (bdrv_open2(bs, filename, flags, drv) < 0) { error("Could not open '%s'", filename); } -- 1.7.0.3