]> git.proxmox.com Git - mirror_qemu.git/commitdiff
nbd-server-add: Fix the default for 'writable'
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 28 Nov 2012 10:46:39 +0000 (11:46 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 28 Nov 2012 10:56:39 +0000 (11:56 +0100)
The documentation to this monitor command tells, that 'writable'
argument is optional and defaults to false. However, the code sets
true as the default. But since some applications may already been
using this, it's safer to fix the code and not documentation which
would break those applications.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
blockdev-nbd.c

index d1721a3e26fd6e2a314ea271ed5f70c13f12cb4a..6b26bbf8c500196b8ff12dafa9b9cd94f8616b2c 100644 (file)
@@ -99,7 +99,7 @@ void qmp_nbd_server_add(const char *device, bool has_writable, bool writable,
     }
 
     if (!has_writable) {
-        writable = true;
+        writable = false;
     }
     if (bdrv_is_read_only(bs)) {
         writable = false;