[libvirt] PATCH: Improve some remote driver error messages

Daniel Veillard veillard at redhat.com
Tue Aug 19 13:53:33 UTC 2008


On Tue, Aug 19, 2008 at 11:47:38AM +0100, Daniel P. Berrange wrote:
> Bug reports from users have shown diagnosing problems with the remote
> driver are quite tricky, so I've been looking at improving its error
> messages where possible. There's a number of places where we simply
> pass in  strerror(errno) as the only data in virRaiseError. This doesn't
> let us narrow down just which call failed - we just get a generic message
> "Permission denied" or "Connection refused" with no clue what was being
> tried.
> 
> This patch adds descriptive error messages whereever possible, fixes a
> place where we'd report an error to connect to  IPv4 even if IPv6 
> succeeded, and adds some missing translations

  Sounds and look fine, I'm just wondering about

> @@ -491,12 +490,15 @@
>          // http://people.redhat.com/drepper/userapi-ipv6.html
>          struct addrinfo *res, *r;
>          struct addrinfo hints;
> +        int saved_errno = EINVAL;
>          memset (&hints, 0, sizeof hints);
>          hints.ai_socktype = SOCK_STREAM;

  the initialization value is a bit strange, shouldn't we use 0 instead,
but I assume all paths where we report the error at the end initialize
the value so it's not a problem,

  +1

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list