virt plugin: fail init with no libvirt connection
authorFrancesco Romani <fromani@redhat.com>
Mon, 12 Dec 2016 15:07:25 +0000 (16:07 +0100)
committerFrancesco Romani <fromani@redhat.com>
Mon, 12 Dec 2016 15:07:25 +0000 (16:07 +0100)
commit5903e6d5414b1a9580a63c29afff1788cec6c91e
tree28d05f8b40102c335ce9d8cb82b11024af030ff8
parentb2541eb463165a5973fedb5d51eab8288fcd7ebc
virt plugin: fail init with no libvirt connection

Even though we handle disconnection and reconnection
in the read() callback, we expect the libvirt connection
to be available most of the time, including the init()
stage.

Thus, let's fail init() if the connection is not available.

Signed-off-by: Francesco Romani <fromani@redhat.com>
src/virt.c