mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-21 15:33:53 +03:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user