read-only: minor cleanup
authorNaphtali Sprei <nsprei@redhat.com>
Sun, 14 Mar 2010 13:19:57 +0000 (15:19 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 17 Mar 2010 16:16:15 +0000 (11:16 -0500)
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>
qemu-nbd.c

index eac0c21..a393583 100644 (file)
@@ -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);