[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] net/slirp: fix the error message when the prefi
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] net/slirp: fix the error message when the prefix len is invalid |
Date: |
Thu, 09 May 2019 16:54:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Stefano Garzarella <address@hidden> writes:
> Add a missing parentheses at the end of the error message,
> when we have an invalid prefix len.
>
> Signed-off-by: Stefano Garzarella <address@hidden>
> ---
> 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"?