[systemd-commits] src/systemctl.c

Lennart Poettering lennart at kemper.freedesktop.org
Thu Sep 29 06:32:24 PDT 2011


 src/systemctl.c |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 8185a5090a34531b9ef0a65ed3e948e7b6839754
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Sep 29 15:31:53 2011 +0200

    systemctl: fix detection whether the dbus connection is available

diff --git a/src/systemctl.c b/src/systemctl.c
index 848d6a8..7af0f73 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -4989,6 +4989,13 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
                         return 0;
                 }
 
+                if (!bus) {
+                        log_error("Failed to get D-Bus connection: %s", error->message);
+                        return -EIO;
+                }
+
+        } else {
+
                 if (!bus && !avoid_bus()) {
                         log_error("Failed to get D-Bus connection: %s", error->message);
                         return -EIO;



More information about the systemd-commits mailing list