From patchwork Wed Nov 28 15:30:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] nbd-server-add: Fix the default for 'writable' Date: Wed, 28 Nov 2012 05:30:04 -0000 From: Paolo Bonzini X-Patchwork-Id: 202482 Message-Id: <1354116604-32298-3-git-send-email-pbonzini@redhat.com> To: qemu-devel@nongnu.org Cc: Michal Privoznik , aliguori@us.ibm.com From: Michal Privoznik 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 Signed-off-by: Paolo Bonzini --- blockdev-nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev-nbd.c b/blockdev-nbd.c index d1721a3..6b26bbf 100644 --- a/blockdev-nbd.c +++ b/blockdev-nbd.c @@ -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;