From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr26x-0005HB-6G for qemu-devel@nongnu.org; Tue, 27 Oct 2015 07:08:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zr26w-0007yW-8E for qemu-devel@nongnu.org; Tue, 27 Oct 2015 07:08:15 -0400 Date: Tue, 27 Oct 2015 12:08:05 +0100 From: Kevin Wolf Message-ID: <20151027110805.GD6692@noname.str.redhat.com> References: <1445903114-22566-1-git-send-email-jsnow@redhat.com> <1445903114-22566-4-git-send-email-jsnow@redhat.com> <562EE0CE.1040401@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <562EE0CE.1040401@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 3/3] qemu-io: Correct error messages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: John Snow , qemu-devel@nongnu.org, qemu-block@nongnu.org, mreitz@redhat.com --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 27.10.2015 um 03:26 hat Eric Blake geschrieben: > On 10/26/2015 05:45 PM, John Snow wrote: > > Reported-by: Max Reitz > > Signed-off-by: John Snow > > Reviewed-by: Eric Blake > > --- > > qemu-io-cmds.c | 53 ++++++++++++++++++++++++++++++++++----------------= --- > > 1 file changed, 34 insertions(+), 19 deletions(-) > >=20 > > diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c > > index 44d24e8..92c6b87 100644 > > --- a/qemu-io-cmds.c > > +++ b/qemu-io-cmds.c > > @@ -146,6 +146,21 @@ static int64_t cvtnum(const char *s) > > return ret; > > } > > =20 > > +static void print_cvtnum_err(int64_t rc, const char *arg) > > +{ > > + switch (rc) { > > + case -EINVAL: > > + printf("Parsing error: non-numeric argument," > > + " or extraneous/unrecognized suffix -- %s\n", arg); > > + break; > > + case -ERANGE: > > + printf("Parsing error: argument too large -- %s\n", arg); > > + break; > > + default: > > + printf("Parsing error -- %s\n", arg); >=20 > I still think ':' is better than ' --' in error messages, but I'll leave > it up to the maintainer. This isn't important enough for a maintainer decision - if this isn't something that the patch submitter can decide by himself, what else would be left? In particular because the patch only retains the existing format. I'm happy to merge a patch that uses colons instead, but I won't reject anything just because it doesn't do the conversion. Kevin --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJWL1sVAAoJEH8JsnLIjy/W+4UQAKUGjF2T9DhdRQuey1qyb2Wi x6GPwliZtQhqTiMilMRhM37HnFDgG52zlT7u0bu/z0BxQW0vZsLZqd5GqREIU1si XRNr1DNXrJjJl3pnlndYa36/tOrS+YsyRWsiQ19UHPU7Sdh+zI+MA3GqXWsB+qZd VhIrVGIWxf1xK7f6WVIhIKMDO2wxJusXAMXlE+G+J4YW6bk+4VelM1WbDdnudZ04 CUiVdAvpzAj3pVNWKafdPXzmmEdUMbyME4cnJCAnek8k6N5dan3/ZKXp7A/sh/ar OaiFFOgHwwN3cB/P0dhmR+edAhAl44XsBD95umsk5CO0WmVPUqjFNnmPt0xJp7+E 0c9qX7NRSkoA1dvMWiUH2h2qoW0KujHhCIdeq1AoBVG3jlIxS5ycdGzmqmGYyzI2 WaOM+boOPWXXsGPM5VMgDLr77WSLuEOGW0C3Vh717khsT8qAMpIH8uF+mj+HGrWX Fnc/9eIU2qY9gPxjHWV5FGCYCp1WSh8oeqbXMd7Ak5mQxYZFp8c8TvuFNXYRNiBl H5atbiNUq8AQclRmP/WyaHWevrSvyZXGRStPv8Bhht/s7ECz9wGO8xoBFWaljuuI 5xX0yXYdrffqPaHRpLuXPrF/SrN0YzuRLgct+cdxy6opNqOVIfLKyjpsdgph2H9H YMhDNO7f5d8JsGQYOVgq =Ei0H -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY--