diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-09-29 16:00:29 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-09-29 16:00:29 +0200 |
commit | f176b5c296ad36119aa2464f9fd738e6da59eeee (patch) | |
tree | a46b0fb84cbb8ced61ba62be63fc3ea28456bcc8 /src | |
parent | 8185a5090a34531b9ef0a65ed3e948e7b6839754 (diff) |
systemctl: fix error message when no connection to systemd is available
Diffstat (limited to 'src')
-rw-r--r-- | src/systemctl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/systemctl.c b/src/systemctl.c index 7af0f73827..9b54da16ca 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -4990,14 +4990,16 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError } if (!bus) { - log_error("Failed to get D-Bus connection: %s", error->message); + log_error("Failed to get D-Bus connection: %s", + dbus_error_is_set(error) ? error->message : "No connection to service manager."); return -EIO; } } else { if (!bus && !avoid_bus()) { - log_error("Failed to get D-Bus connection: %s", error->message); + log_error("Failed to get D-Bus connection: %s", + dbus_error_is_set(error) ? error->message : "No connection to service manager."); return -EIO; } } |