summaryrefslogtreecommitdiffstats
path: root/qemu-nbd.c
diff options
context:
space:
mode:
authorNaphtali Sprei2010-03-14 14:19:57 +0100
committerAnthony Liguori2010-03-17 17:16:15 +0100
commit07108b29c5f3b01f8c8f511d2af16ad33aa6b2d3 (patch)
treef42e7cc4a22546a70df129a0ffb5a772c95ad44d /qemu-nbd.c
parentsplit out qemu-timer.c (diff)
downloadqemu-07108b29c5f3b01f8c8f511d2af16ad33aa6b2d3.tar.gz
qemu-07108b29c5f3b01f8c8f511d2af16ad33aa6b2d3.tar.xz
qemu-07108b29c5f3b01f8c8f511d2af16ad33aa6b2d3.zip
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);