mirror of
https://github.com/systemd/systemd.git
synced 2024-11-07 01:27:11 +03:00
systemctl: fix error message when no connection to systemd is available
This commit is contained in:
parent
8185a5090a
commit
f176b5c296
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user