]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Improve error reporting when libvirtd is not installed
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 6 Dec 2011 21:46:22 +0000 (21:46 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 7 Dec 2011 09:58:21 +0000 (09:58 +0000)
commit13c881dcbfb6ab222e51f68eca4fdcb314c2759e
tree57e818c4afbaa23c5c27b729975dc47bd108976e
parentd336dbdb3359702b587bae603db1e49024a1df0a
Improve error reporting when libvirtd is not installed

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

* src/remote/remote_driver.c: Report error if libvirtd
  cannot be found
* src/rpc/virnetsocket.c: Report error if caller requested
  spawning of daemon, but provided no binary path
src/remote/remote_driver.c
src/rpc/virnetsocket.c