From patchwork Wed Nov 28 10:46:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TWljaGFsIFByw612b3puw61r?= X-Patchwork-Id: 202429 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CAB1A2C0080 for ; Wed, 28 Nov 2012 21:47:02 +1100 (EST) Received: from localhost ([::1]:54271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdfAR-0005ZR-Qd for incoming@patchwork.ozlabs.org; Wed, 28 Nov 2012 05:46:59 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdfAG-0005Z1-3u for qemu-devel@nongnu.org; Wed, 28 Nov 2012 05:46:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TdfAC-0005m1-8H for qemu-devel@nongnu.org; Wed, 28 Nov 2012 05:46:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdfAC-0005ls-0c; Wed, 28 Nov 2012 05:46:44 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qASAkgbB017543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Nov 2012 05:46:42 -0500 Received: from bart.brq.redhat.com (dhcp-27-249.brq.redhat.com [10.34.27.249]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qASAkeXC015993; Wed, 28 Nov 2012 05:46:41 -0500 From: Michal Privoznik To: qemu-devel@nongnu.org Date: Wed, 28 Nov 2012 11:46:39 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-trivial@nongnu.org Subject: [Qemu-devel] [PATCH] nbd-server-add: Fix the default for 'writable' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- blockdev-nbd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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;