* [Qemu-trivial] [PATCH] net/slirp: fix the error message when the prefix len is invalid @ 2019-05-09 13:37 Stefano Garzarella 2019-05-09 13:54 ` [Qemu-trivial] [Qemu-devel] " Marc-André Lureau 2019-05-09 14:54 ` Markus Armbruster 0 siblings, 2 replies; 6+ messages in thread From: Stefano Garzarella @ 2019-05-09 13:37 UTC (permalink / raw) To: qemu-devel; +Cc: Jan Kiszka, qemu-trivial, Samuel Thibault, Jason Wang Add a missing parentheses at the end of the error message, when we have an invalid prefix len. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> --- net/slirp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/slirp.c b/net/slirp.c index 95934fb36d..0f4ae0abc0 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model, } if (vprefix6_len < 0 || vprefix6_len > 126) { error_setg(errp, - "Invalid prefix provided (prefix len must be in range 0-126"); + "Invalid prefix provided " + "(prefix len must be in range 0-126)"); return -1; } -- 2.20.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] net/slirp: fix the error message when the prefix len is invalid 2019-05-09 13:37 [Qemu-trivial] [PATCH] net/slirp: fix the error message when the prefix len is invalid Stefano Garzarella @ 2019-05-09 13:54 ` Marc-André Lureau 2019-05-09 14:54 ` Markus Armbruster 1 sibling, 0 replies; 6+ messages in thread From: Marc-André Lureau @ 2019-05-09 13:54 UTC (permalink / raw) To: Stefano Garzarella Cc: QEMU, qemu trival, Jan Kiszka, Jason Wang, Samuel Thibault On Thu, May 9, 2019 at 3:39 PM Stefano Garzarella <sgarzare@redhat.com> wrote: > > Add a missing parentheses at the end of the error message, > when we have an invalid prefix len. > > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> > --- > net/slirp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/slirp.c b/net/slirp.c > index 95934fb36d..0f4ae0abc0 100644 > --- a/net/slirp.c > +++ b/net/slirp.c > @@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model, > } > if (vprefix6_len < 0 || vprefix6_len > 126) { > error_setg(errp, > - "Invalid prefix provided (prefix len must be in range 0-126"); > + "Invalid prefix provided " > + "(prefix len must be in range 0-126)"); > return -1; > } > > -- > 2.20.1 > > -- Marc-André Lureau ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] net/slirp: fix the error message when the prefix len is invalid 2019-05-09 13:37 [Qemu-trivial] [PATCH] net/slirp: fix the error message when the prefix len is invalid Stefano Garzarella 2019-05-09 13:54 ` [Qemu-trivial] [Qemu-devel] " Marc-André Lureau @ 2019-05-09 14:54 ` Markus Armbruster 2019-05-09 15:16 ` Stefano Garzarella 1 sibling, 1 reply; 6+ messages in thread From: Markus Armbruster @ 2019-05-09 14:54 UTC (permalink / raw) To: Stefano Garzarella Cc: qemu-devel, qemu-trivial, Jan Kiszka, Jason Wang, Samuel Thibault Stefano Garzarella <sgarzare@redhat.com> writes: > Add a missing parentheses at the end of the error message, > when we have an invalid prefix len. > > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> > --- > net/slirp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/slirp.c b/net/slirp.c > index 95934fb36d..0f4ae0abc0 100644 > --- a/net/slirp.c > +++ b/net/slirp.c > @@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model, > } > if (vprefix6_len < 0 || vprefix6_len > 126) { > error_setg(errp, > - "Invalid prefix provided (prefix len must be in range 0-126"); > + "Invalid prefix provided " > + "(prefix len must be in range 0-126)"); > return -1; > } Preexisting: the error message fails to identify the offending parameter. The user needs to make the connection to "ipv6-prefixlen" based on the fact that the only parameters with "prefix" in name or description are "ipv6-prefix" and "ipv6-prefixlen", and only the latter is a length. What about "Parameter 'ipv6-prefixlen' expects a length below 127", or "Parameter 'ipv6-prefixlen' expects a value between 0 and 126"? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] net/slirp: fix the error message when the prefix len is invalid 2019-05-09 14:54 ` Markus Armbruster @ 2019-05-09 15:16 ` Stefano Garzarella 2019-05-10 5:56 ` Markus Armbruster 0 siblings, 1 reply; 6+ messages in thread From: Stefano Garzarella @ 2019-05-09 15:16 UTC (permalink / raw) To: Markus Armbruster Cc: qemu-devel, qemu-trivial, Jan Kiszka, Jason Wang, Samuel Thibault On Thu, May 09, 2019 at 04:54:35PM +0200, Markus Armbruster wrote: > Stefano Garzarella <sgarzare@redhat.com> writes: > > > Add a missing parentheses at the end of the error message, > > when we have an invalid prefix len. > > > > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> > > --- > > net/slirp.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/net/slirp.c b/net/slirp.c > > index 95934fb36d..0f4ae0abc0 100644 > > --- a/net/slirp.c > > +++ b/net/slirp.c > > @@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model, > > } > > if (vprefix6_len < 0 || vprefix6_len > 126) { > > error_setg(errp, > > - "Invalid prefix provided (prefix len must be in range 0-126"); > > + "Invalid prefix provided " > > + "(prefix len must be in range 0-126)"); > > return -1; > > } > > Preexisting: the error message fails to identify the offending > parameter. The user needs to make the connection to "ipv6-prefixlen" > based on the fact that the only parameters with "prefix" in name or > description are "ipv6-prefix" and "ipv6-prefixlen", and only the latter > is a length. > > What about "Parameter 'ipv6-prefixlen' expects a length below 127", or > "Parameter 'ipv6-prefixlen' expects a value between 0 and 126"? "Parameter 'ipv6-prefixlen' expects a value between 0 and 126" should be fine. Otherwise, since other errors didn't refer to the parameter name, we can simply add IPv6 in this way: "Invalid IPv6 prefix provided (IPv6 prefix len must be between 0 and 126)" But I'm fine also with your proposal. Thanks, Stefano ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] net/slirp: fix the error message when the prefix len is invalid 2019-05-09 15:16 ` Stefano Garzarella @ 2019-05-10 5:56 ` Markus Armbruster 2019-05-10 7:58 ` Stefano Garzarella 0 siblings, 1 reply; 6+ messages in thread From: Markus Armbruster @ 2019-05-10 5:56 UTC (permalink / raw) To: Stefano Garzarella Cc: qemu-trivial, Jan Kiszka, Jason Wang, qemu-devel, Samuel Thibault Stefano Garzarella <sgarzare@redhat.com> writes: > On Thu, May 09, 2019 at 04:54:35PM +0200, Markus Armbruster wrote: >> Stefano Garzarella <sgarzare@redhat.com> writes: >> >> > Add a missing parentheses at the end of the error message, >> > when we have an invalid prefix len. >> > >> > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> >> > --- >> > net/slirp.c | 3 ++- >> > 1 file changed, 2 insertions(+), 1 deletion(-) >> > >> > diff --git a/net/slirp.c b/net/slirp.c >> > index 95934fb36d..0f4ae0abc0 100644 >> > --- a/net/slirp.c >> > +++ b/net/slirp.c >> > @@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model, >> > } >> > if (vprefix6_len < 0 || vprefix6_len > 126) { >> > error_setg(errp, >> > - "Invalid prefix provided (prefix len must be in range 0-126"); >> > + "Invalid prefix provided " >> > + "(prefix len must be in range 0-126)"); >> > return -1; >> > } >> >> Preexisting: the error message fails to identify the offending >> parameter. The user needs to make the connection to "ipv6-prefixlen" >> based on the fact that the only parameters with "prefix" in name or >> description are "ipv6-prefix" and "ipv6-prefixlen", and only the latter >> is a length. >> >> What about "Parameter 'ipv6-prefixlen' expects a length below 127", or >> "Parameter 'ipv6-prefixlen' expects a value between 0 and 126"? > > "Parameter 'ipv6-prefixlen' expects a value between 0 and 126" should be > fine. > > Otherwise, since other errors didn't refer to the parameter name, we can > simply add IPv6 in this way: > "Invalid IPv6 prefix provided (IPv6 prefix len must be between 0 and 126)" "len" is not a word. Either say "ipv6-prefixlen", or say "IPv6 prefix length". > But I'm fine also with your proposal. It's just a suggestion. Feel free to leave the error messages consistently vague (apply your patch as is), improve just this one, or improve more messages. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] net/slirp: fix the error message when the prefix len is invalid 2019-05-10 5:56 ` Markus Armbruster @ 2019-05-10 7:58 ` Stefano Garzarella 0 siblings, 0 replies; 6+ messages in thread From: Stefano Garzarella @ 2019-05-10 7:58 UTC (permalink / raw) To: Markus Armbruster Cc: qemu-trivial, Jan Kiszka, Jason Wang, qemu-devel, Samuel Thibault On Fri, May 10, 2019 at 07:56:47AM +0200, Markus Armbruster wrote: > Stefano Garzarella <sgarzare@redhat.com> writes: > > > On Thu, May 09, 2019 at 04:54:35PM +0200, Markus Armbruster wrote: > >> Stefano Garzarella <sgarzare@redhat.com> writes: > >> > >> > Add a missing parentheses at the end of the error message, > >> > when we have an invalid prefix len. > >> > > >> > Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> > >> > --- > >> > net/slirp.c | 3 ++- > >> > 1 file changed, 2 insertions(+), 1 deletion(-) > >> > > >> > diff --git a/net/slirp.c b/net/slirp.c > >> > index 95934fb36d..0f4ae0abc0 100644 > >> > --- a/net/slirp.c > >> > +++ b/net/slirp.c > >> > @@ -498,7 +498,8 @@ static int net_slirp_init(NetClientState *peer, const char *model, > >> > } > >> > if (vprefix6_len < 0 || vprefix6_len > 126) { > >> > error_setg(errp, > >> > - "Invalid prefix provided (prefix len must be in range 0-126"); > >> > + "Invalid prefix provided " > >> > + "(prefix len must be in range 0-126)"); > >> > return -1; > >> > } > >> > >> Preexisting: the error message fails to identify the offending > >> parameter. The user needs to make the connection to "ipv6-prefixlen" > >> based on the fact that the only parameters with "prefix" in name or > >> description are "ipv6-prefix" and "ipv6-prefixlen", and only the latter > >> is a length. > >> > >> What about "Parameter 'ipv6-prefixlen' expects a length below 127", or > >> "Parameter 'ipv6-prefixlen' expects a value between 0 and 126"? > > > > "Parameter 'ipv6-prefixlen' expects a value between 0 and 126" should be > > fine. > > > > Otherwise, since other errors didn't refer to the parameter name, we can > > simply add IPv6 in this way: > > "Invalid IPv6 prefix provided (IPv6 prefix len must be between 0 and 126)" > > "len" is not a word. Either say "ipv6-prefixlen", or say "IPv6 prefix > length". > > > But I'm fine also with your proposal. > > It's just a suggestion. Feel free to leave the error messages > consistently vague (apply your patch as is), improve just this one, or > improve more messages. Your suggestions are very appreciated! I'll resend this patch fixing this error message and I'll check also the other messages. Thanks, Stefano ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-05-10 7:58 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-05-09 13:37 [Qemu-trivial] [PATCH] net/slirp: fix the error message when the prefix len is invalid Stefano Garzarella 2019-05-09 13:54 ` [Qemu-trivial] [Qemu-devel] " Marc-André Lureau 2019-05-09 14:54 ` Markus Armbruster 2019-05-09 15:16 ` Stefano Garzarella 2019-05-10 5:56 ` Markus Armbruster 2019-05-10 7:58 ` Stefano Garzarella
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).