diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-10-22 12:32:02 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-10-22 12:32:02 +0200 |
commit | d64a5b30f10a07001c4124f5c4127452fc3cac99 (patch) | |
tree | 2ac147f476c9b2802d7cf7f9ea6e84ec3bd52845 /src/shared/bus-util.c | |
parent | bus-util: Special case when DBUS_SESSION_BUS_ADDRESS is set and XDG_RUNTIME_D... (diff) | |
download | systemd-d64a5b30f10a07001c4124f5c4127452fc3cac99.tar.xz systemd-d64a5b30f10a07001c4124f5c4127452fc3cac99.zip |
bus-util: Fix bus_log_connect_error()
Diffstat (limited to 'src/shared/bus-util.c')
-rw-r--r-- | src/shared/bus-util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index fa4f879b7b..ce94597955 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -56,9 +56,9 @@ int bus_log_connect_error(int r, BusTransport transport, RuntimeScope scope) { hint_addr = transport == BUS_TRANSPORT_LOCAL && ERRNO_IS_PRIVILEGE(r); return log_error_errno(r, - r == hint_vars ? "Failed to connect to %s scope bus via %s transport: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)" : - r == hint_addr ? "Failed to connect to %s scope bus via %s transport: Operation not permitted (consider using --machine=<user>@.host --user to connect to bus of other user)" : - "Failed to connect to %s scope bus via %s transport: %m", runtime_scope_to_string(scope), bus_transport_to_string(transport)); + hint_vars ? "Failed to connect to %s scope bus via %s transport: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)" : + hint_addr ? "Failed to connect to %s scope bus via %s transport: Operation not permitted (consider using --machine=<user>@.host --user to connect to bus of other user)" : + "Failed to connect to %s scope bus via %s transport: %m", runtime_scope_to_string(scope), bus_transport_to_string(transport)); } int bus_async_unregister_and_exit(sd_event *e, sd_bus *bus, const char *name) { |