From 6473096661455abe5b44e5c8fceb0536da355436 Mon Sep 17 00:00:00 2001 From: Naphtali Sprei Date: Wed, 7 Apr 2010 16:44:25 -0300 Subject: [PATCH 14/21] read-only: minor cleanup RH-Author: Naphtali Sprei Message-id: <1270658667-14294-15-git-send-email-nsprei@redhat.com> Patchwork-id: 8450 O-Subject: [RHEL6 kvm PATCH v3 rebase 14/16] read-only: minor cleanup Bugzilla: 537164 RH-Acked-by: Daniel P. Berrange RH-Acked-by: Christoph Hellwig RH-Acked-by: Juan Quintela RH-Acked-by: Kevin Wolf Really use read-only flags for opening the file when asked for read-only BZ: https://bugzilla.redhat.com/show_bug.cgi?id=537164 upstream commit: 07108b29c5f3b01f8c8f511d2af16ad33aa6b2d3 Signed-off-by: Naphtali Sprei --- qemu-nbd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) Signed-off-by: Eduardo Habkost --- qemu-nbd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 645368c..1870026 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -257,6 +257,7 @@ int main(int argc, char **argv) break; case 'r': readonly = true; + flags &= ~BDRV_O_RDWR; break; case 'P': partition = strtol(optarg, &end, 0); -- 1.7.0.3