bus-util: Log more information when connecting to a bus socket fails

Let's log about which bus we're trying to connect to and what transport
we're using to do it.
This commit is contained in:
Daan De Meyer
2024-10-09 10:27:53 +02:00
parent a407aaa6ff
commit d8a77d55e6
30 changed files with 49 additions and 38 deletions
+2 -2
View File
@@ -1558,7 +1558,7 @@ static int reload_system_manager(sd_bus **bus) {
if (!*bus) {
r = bus_connect_transport_systemd(BUS_TRANSPORT_LOCAL, NULL, RUNTIME_SCOPE_SYSTEM, bus);
if (r < 0)
return bus_log_connect_error(r, BUS_TRANSPORT_LOCAL);
return bus_log_connect_error(r, BUS_TRANSPORT_LOCAL, RUNTIME_SCOPE_SYSTEM);
}
r = bus_service_manager_reload(*bus);
@@ -1581,7 +1581,7 @@ static int reload_vconsole(sd_bus **bus) {
if (!*bus) {
r = bus_connect_transport_systemd(BUS_TRANSPORT_LOCAL, NULL, RUNTIME_SCOPE_SYSTEM, bus);
if (r < 0)
return bus_log_connect_error(r, BUS_TRANSPORT_LOCAL);
return bus_log_connect_error(r, BUS_TRANSPORT_LOCAL, RUNTIME_SCOPE_SYSTEM);
}
r = bus_wait_for_jobs_new(*bus, &w);