On 07/08/2011 08:28 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
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
---
daemon/libvirtd.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 06d2077..fe0fa27 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -1028,6 +1028,10 @@ daemonConfigLoad(struct daemonConfig *data,
{
virConfPtr conf;
+ if (access(filename, R_OK) == -1 &&
+ errno == ENOENT)
+ return 0;
+
This patch breaks 'make check' - tests/libvirtd-fail is now reporting
failure.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org