mirror of
https://github.com/systemd/systemd.git
synced 2024-11-07 01:27:11 +03:00
systemctl: fix detection whether the dbus connection is available
This commit is contained in:
parent
652eb44a7f
commit
8185a5090a
@ -4989,6 +4989,13 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!bus) {
|
||||||
|
log_error("Failed to get D-Bus connection: %s", error->message);
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
if (!bus && !avoid_bus()) {
|
if (!bus && !avoid_bus()) {
|
||||||
log_error("Failed to get D-Bus connection: %s", error->message);
|
log_error("Failed to get D-Bus connection: %s", error->message);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
Loading…
Reference in New Issue
Block a user