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>
diff --git a/qemu-nbd.c b/qemu-nbd.c
index eac0c21..a393583 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -258,6 +258,7 @@
             break;
         case 'r':
             readonly = true;
+            flags &= ~BDRV_O_RDWR;
             break;
         case 'P':
             partition = strtol(optarg, &end, 0);