diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2012-04-04 15:00:17 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2012-04-10 11:12:27 +0100 |
commit | a4475839dd5efa0155d8f470ae13f15cbad88674 (patch) | |
tree | 212b1c8287974990f8ed1c1ba4a0c8220528e475 /daemon/libvirtd.c | |
parent | Add API for loading daemon config from in-memory blob (diff) | |
download | libvirt-a4475839dd5efa0155d8f470ae13f15cbad88674.tar.gz libvirt-a4475839dd5efa0155d8f470ae13f15cbad88674.tar.bz2 libvirt-a4475839dd5efa0155d8f470ae13f15cbad88674.zip |
Switch libvirtd config loading code to use error APIs
Using VIR_ERROR means the test suite can't catch error messages
easily. Use the proper error reporting APIs instead
Diffstat (limited to 'daemon/libvirtd.c')
-rw-r--r-- | daemon/libvirtd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 460a552b9..ce931d4a1 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -923,7 +923,12 @@ int main(int argc, char **argv) { /* Read the config file if it exists*/ if (remote_config_file && daemonConfigLoadFile(config, remote_config_file, implicit_conf) < 0) { - VIR_ERROR(_("Can't load config file '%s'"), remote_config_file); + virErrorPtr err = virGetLastError(); + if (err && err->message) + VIR_ERROR(_("Can't load config file: %s: %s"), + err->message, remote_config_file); + else + VIR_ERROR(_("Can't load config file: %s"), remote_config_file); exit(EXIT_FAILURE); } |