提交 8e2e4780 编写于 作者: D Daniel P. Berrange

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
上级 3cfdc57b
...@@ -1028,6 +1028,10 @@ daemonConfigLoad(struct daemonConfig *data, ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册