[libvirt] [PATCH 1/2] virterror: Fix error message for VIR_ERR_INVALID_ARG

Eric Blake eblake at redhat.com
Fri Aug 26 14:34:06 UTC 2011


On 08/26/2011 03:56 AM, Michal Privoznik wrote:
> When a detail message is presented, nobody expects prefix 'invalid
> argument in' but something more general, like 'invalid argument:'.
> ---
>   src/util/virterror.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/util/virterror.c b/src/util/virterror.c
> index c5babb1..f4541bd 100644
> --- a/src/util/virterror.c
> +++ b/src/util/virterror.c
> @@ -794,7 +794,7 @@ virErrorMsg(virErrorNumber error, const char *info)
>               if (info == NULL)
>                   errmsg = _("invalid argument in");

Do we need to fix this one too, to just "invalid argument"?  Then again, 
I don't know if any callers pass NULL for info (this whole virterror.c 
code could use some major cleanups.  I have a stale patch in my local 
git tree where I tried to simplify things once to not have an if/else 
inside every case: of that function, but it would take a while to dig it 
out and get it into shape with the current tree).

>               else
> -                errmsg = _("invalid argument in %s");
> +                errmsg = _("invalid argument: %s");

ACK with the counterpart line fixed too.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




More information about the libvir-list mailing list