From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr6i0-0004m0-KQ for qemu-devel@nongnu.org; Tue, 27 Oct 2015 12:02:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zr6hv-0000Vj-UN for qemu-devel@nongnu.org; Tue, 27 Oct 2015 12:02:48 -0400 Date: Tue, 27 Oct 2015 17:02:32 +0100 From: Kevin Wolf Message-ID: <20151027160232.GD15916@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> <562F9D5E.8040809@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <562F9D5E.8040809@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: John Snow Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, mreitz@redhat.com Am 27.10.2015 um 16:50 hat John Snow geschrieben: > > > On 10/26/2015 10:26 PM, Eric Blake wrote: > > 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(-) > >> > >> 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; > >> } > >> > >> +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); > > > > I still think ':' is better than ' --' in error messages, but I'll leave > > it up to the maintainer. > > Crud, sorry Eric -- I didn't do this on purpose. As Kevin notes, I was > just trying to match the existing format. I can change it and send again > if you want. Whatever is easiest for people. I think you need to respin for patch 1 anyway, so changing it in the next version sounds good. You can keep my R-b when doing this. Kevin