On Wed, Oct 13, 2010 at 10:18:42AM +0200, Guido Günther wrote:
Hi,
when using HAL instead of udev for nodeinfo we don't fail if HAL isn't
available. We also shouldn't fail if D-Bus is missing thenn either.
Attached patch fixes this. O.k. to apply?
Cheers,
-- Guido
>From aab94ae8d34e462cd937ada7367560389f79aa25 Mon Sep 17 00:00:00
2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx(a)sigxcpu.org>
Date: Wed, 13 Oct 2010 09:07:48 +0200
Subject: [PATCH] Don't fail on missing D-Bus
We don't fail when we can't contact HAL so we shouldn't fail if we can't
contact D-Bus either.
---
.gnulib | 2 +-
src/node_device/node_device_hal.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/.gnulib b/.gnulib
index 2bb63bf..833bff3 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 2bb63bfb25474ea147ee9f1523c0337997359a4c
+Subproject commit 833bff3a531e4730779f8c7be1d9f7c471e6f221
diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c
hum, that .gnulib change certainly should not be commited
index c2b3c8f..547e5ca 100644
--- a/src/node_device/node_device_hal.c
+++ b/src/node_device/node_device_hal.c
@@ -724,6 +724,10 @@ static int halDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
dbus_conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
if (dbus_conn == NULL) {
VIR_ERROR0(_("dbus_bus_get failed"));
+ /* We don't want to show a fatal error here,
+ otherwise entire libvirtd shuts down when
+ D-Bus isn't running */
+ ret = 0;
goto failure;
}
dbus_connection_set_exit_on_disconnect(dbus_conn, FALSE);
With your explanation, that makes sense, yes, ACK to that part
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/