chiark / gitweb /
[PATCH] add documentation about the BUS key being optional for the LABEL rule.
[elogind.git] / udev.c
diff --git a/udev.c b/udev.c
index bf18a568eaae06b7ce09b3ea0ca79ddde3be0434..71c5f1fba538f33043495d231650722db7992e09 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -31,6 +31,7 @@
 
 #include "udev.h"
 #include "udev_version.h"
+#include "udev_dbus.h"
 #include "namedev.h"
 #include "udevdb.h"
 #include "libsysfs/libsysfs.h"
@@ -111,11 +112,14 @@ int main(int argc, char **argv, char **envp)
        /* initialize our configuration */
        udev_init_config();
 
+       /* connect to the system message bus */
+       sysbus_connect();
+
        /* initialize udev database */
        retval = udevdb_init(UDEVDB_DEFAULT);
        if (retval != 0) {
                dbg("unable to initialize database");
-               goto exit;
+               goto exit_sysbus;
        }
 
        /* initialize the naming deamon */
@@ -133,6 +137,10 @@ int main(int argc, char **argv, char **envp)
        }
        udevdb_exit();
 
-exit:  
+exit_sysbus:
+       /* disconnect from the system message bus */
+       sysbus_disconnect();
+
+exit:
        return retval;
 }