From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXDNo-0003jk-HG for qemu-devel@nongnu.org; Mon, 07 Apr 2014 13:31:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXDNh-0000n3-LE for qemu-devel@nongnu.org; Mon, 07 Apr 2014 13:30:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXDNh-0000mw-5n for qemu-devel@nongnu.org; Mon, 07 Apr 2014 13:30:49 -0400 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 s37HUk52029071 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 7 Apr 2014 13:30:48 -0400 From: Max Reitz Date: Mon, 7 Apr 2014 19:29:58 +0200 Message-Id: <1396891800-8627-3-git-send-email-mreitz@redhat.com> In-Reply-To: <1396891800-8627-1-git-send-email-mreitz@redhat.com> References: <1396891800-8627-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 2/4] block-commit: speed is an optional parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz As speed is an optional parameter for the QMP block-commit command, it should be set to 0 if not given (as it is undefined if has_speed is false), that is, the speed should not be limited. Signed-off-by: Max Reitz --- blockdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/blockdev.c b/blockdev.c index 0be4601..337c11f 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1876,6 +1876,7 @@ void qmp_block_commit(const char *device, */ BlockdevOnError on_error = BLOCKDEV_ON_ERROR_REPORT; + speed = speed ? speed : 0; granularity = has_granularity ? granularity : 0; if (has_granularity && -- 1.9.1