mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00: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:
parent
3cfdc57b85
commit
8e2e47803c
@ -1028,6 +1028,10 @@ daemonConfigLoad(struct daemonConfig *data,
|
|||||||
{
|
{
|
||||||
virConfPtr conf;
|
virConfPtr conf;
|
||||||
|
|
||||||
|
if (access(filename, R_OK) == -1 &&
|
||||||
|
errno == ENOENT)
|
||||||
|
return 0;
|
||||||
|
|
||||||
conf = virConfReadFile (filename, 0);
|
conf = virConfReadFile (filename, 0);
|
||||||
if (!conf)
|
if (!conf)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user