summaryrefslogtreecommitdiff
path: root/qemu-nbd.c
diff options
context:
space:
mode:
authorNaphtali Sprei <nsprei@redhat.com>2010-03-14 15:19:57 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-03-17 11:16:15 -0500
commit07108b29c5f3b01f8c8f511d2af16ad33aa6b2d3 (patch)
treef42e7cc4a22546a70df129a0ffb5a772c95ad44d /qemu-nbd.c
parentdb1a49726c3c6cbe9cbca5b118e80c0fec65e8dd (diff)
read-only: minor cleanup
Really use read-only flags for opening the file when asked for read-only Signed-off-by: Naphtali Sprei <nsprei@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r--qemu-nbd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c
index eac0c21f1c..a393583040 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -258,6 +258,7 @@ int main(int argc, char **argv)
break;
case 'r':
readonly = true;
+ flags &= ~BDRV_O_RDWR;
break;
case 'P':
partition = strtol(optarg, &end, 0);