[libvirt] [PATCH] Improve error reporting when libvirtd is not installed

Eric Blake eblake at redhat.com
Tue Dec 6 22:07:23 UTC 2011

On 12/06/2011 02:48 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> Currently if you try to connect to a local libvirtd when
> libvirtd is not in $PATH, you'll get an error
>   error: internal error invalid use of command API
> This is because remoteFindDaemonPath() returns NULL, which
> causes us to pass NULL into virNetSocketConnectUNIX which
> in turn causes us to pass NULL into virCommandNewArgList.
> Adding missing error checks improves this to
>   error: internal error Unable to locate libvirtd daemon in $PATH

Nice.  Seems simple enough to include in 0.9.8.

> +    if (spawnDaemon && !binary) {
> +        virNetError(VIR_ERR_INTERNAL_ERROR,
> +                    _("Auto-spawn of daemon requested, but not binary specified"));


ACK with spelling nit fixed.

Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111206/a3df98fc/attachment-0001.sig>

More information about the libvir-list mailing list