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
1 changed files with 4 additions and 0 deletions

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;