1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00

systemctl: fix error message when no connection to systemd is available

This commit is contained in:
Lennart Poettering 2011-09-29 16:00:29 +02:00
parent 8185a5090a
commit f176b5c296

View File

@ -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;
}
}