1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-12 13:17:58 +03:00

Don't exit if the libvirtd config does not exist

It is common for the $HOME/.libvirt/libvirtd.conf file to not
exist. Treat this situation as non-fatal since we can carry
on with our default settings just fine.

* daemon/libvirtd.c: Treat ENOENT as non-fatal when loading
  config
This commit is contained in:
Daniel P. Berrange 2011-07-08 15:27:42 +01:00
parent 3cfdc57b85
commit 8e2e47803c

View File

@ -1028,6 +1028,10 @@ daemonConfigLoad(struct daemonConfig *data,
{
virConfPtr conf;
if (access(filename, R_OK) == -1 &&
errno == ENOENT)
return 0;
conf = virConfReadFile (filename, 0);
if (!conf)
return -1;