systemctl: downgrade log level of ECONNREFUSED from system dbus.service

To suppress log message when 'systemctl poweroff' or friends invoked in
rescue shell, which does not have dbus.service.
This commit is contained in:
Yu Watanabe
2024-12-11 18:08:26 +09:00
parent 77064620d7
commit c577fe65f3
5 changed files with 18 additions and 11 deletions
+4 -1
View File
@@ -48,7 +48,10 @@ int bus_connect_transport(BusTransport transport, const char *host, RuntimeScope
int bus_connect_transport_systemd(BusTransport transport, const char *host, RuntimeScope runtime_scope, sd_bus **bus);
int bus_log_address_error(int r, BusTransport transport);
int bus_log_connect_error(int r, BusTransport transport, RuntimeScope scope);
int bus_log_connect_full(int log_level, int r, BusTransport transport, RuntimeScope scope);
static inline int bus_log_connect_error(int r, BusTransport transport, RuntimeScope scope) {
return bus_log_connect_full(LOG_ERR, r, transport, scope);
}
#define bus_log_parse_error(r) \
log_error_errno(r, "Failed to parse bus message: %m")