From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMdyj-0004E1-Ns for qemu-devel@nongnu.org; Wed, 27 Aug 2014 10:13:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMdya-0002Pr-Oa for qemu-devel@nongnu.org; Wed, 27 Aug 2014 10:13:37 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:37953 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMdya-0002PX-IL for qemu-devel@nongnu.org; Wed, 27 Aug 2014 10:13:28 -0400 Date: Wed, 27 Aug 2014 16:12:40 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140827141239.GA31176@irqsave.net> References: <1409146199-12855-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1409146199-12855-1-git-send-email-stefanha@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] blockdev: fix drive-mirror 'granularity' error message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Luiz Capitulino , qemu-devel@nongnu.org, Markus Armbruster The Wednesday 27 Aug 2014 =E0 14:29:59 (+0100), Stefan Hajnoczi wrote : > Name the 'granularity' parameter and give its expected value range. > Previously the device name was mistakingly reported as the parameter > name. >=20 > Note that the error class is unchanged from ERROR_CLASS_GENERIC_ERROR. >=20 > Reported-by: Eric Blake > Signed-off-by: Stefan Hajnoczi > --- > blockdev.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/blockdev.c b/blockdev.c > index 6a204c6..eeb414e 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -2179,11 +2179,12 @@ void qmp_drive_mirror(const char *device, const= char *target, > } > =20 > if (granularity !=3D 0 && (granularity < 512 || granularity > 1048= 576 * 64)) { > - error_set(errp, QERR_INVALID_PARAMETER, device); > + error_set(errp, QERR_INVALID_PARAMETER_VALUE, "granularity", > + "a value in range [512B, 64MB]"); > return; > } > if (granularity & (granularity - 1)) { > - error_set(errp, QERR_INVALID_PARAMETER, device); > + error_set(errp, QERR_INVALID_PARAMETER_VALUE, "granularity", "= power of 2"); > return; > } > =20 > --=20 > 1.9.3 >=20 >=20 Reviewed-by: Beno=EEt Canet