From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tdjar-0004ix-Qx for qemu-devel@nongnu.org; Wed, 28 Nov 2012 10:30:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tdjal-0003LZ-OT for qemu-devel@nongnu.org; Wed, 28 Nov 2012 10:30:33 -0500 Received: from mail-da0-f45.google.com ([209.85.210.45]:38990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tdjal-0003LJ-BP for qemu-devel@nongnu.org; Wed, 28 Nov 2012 10:30:27 -0500 Received: by mail-da0-f45.google.com with SMTP id w4so3601209dam.4 for ; Wed, 28 Nov 2012 07:30:26 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 28 Nov 2012 16:30:04 +0100 Message-Id: <1354116604-32298-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1354116604-32298-1-git-send-email-pbonzini@redhat.com> References: <1354116604-32298-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] nbd-server-add: Fix the default for 'writable' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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; -- 1.8.0