diff options
Diffstat (limited to 'src/shared/bus-util.c')
-rw-r--r-- | src/shared/bus-util.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index c3be78769..c03fe2b46 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -941,7 +941,7 @@ int bus_message_print_all_properties( return log_oom(); r = set_put(*found_properties, name); - if (r < 0 && r != EEXIST) + if (r < 0 && r != -EEXIST) return log_oom(); } @@ -1299,10 +1299,10 @@ int bus_connect_transport(BusTransport transport, const char *host, bool user, s switch (transport) { case BUS_TRANSPORT_LOCAL: -#if 0 /// elogind does not support a user bus if (user) r = sd_bus_default_user(&bus); else { +#if 0 /// elogind is never used with systemd. Avoid useless check. if (sd_booted() <= 0) { /* Print a friendly message when the local system is actually not running systemd as PID 1. */ log_error("System has not been booted with systemd as init system (PID 1). Can't operate."); @@ -1311,9 +1311,7 @@ int bus_connect_transport(BusTransport transport, const char *host, bool user, s } #endif // 0 r = sd_bus_default_system(&bus); -#if 0 /// No closing bracket with elogind... Ain't we simple? ;-) } -#endif // 0 break; case BUS_TRANSPORT_REMOTE: @@ -1356,12 +1354,14 @@ int bus_connect_transport_systemd(BusTransport transport, const char *host, bool if (user) r = bus_connect_user_systemd(bus); else { +#if 0 /// elogind is never used with systemd. Avoid useless check. if (sd_booted() <= 0) { /* Print a friendly message when the local system is actually not running systemd as PID 1. */ log_error("System has not been booted with systemd as init system (PID 1). Can't operate."); return -EHOSTDOWN; } +#endif // 0 r = bus_connect_system_systemd(bus); } break; @@ -1484,12 +1484,10 @@ int bus_log_parse_error(int r) { return log_error_errno(r, "Failed to parse bus message: %m"); } -#if 0 /// UNNEEDED by elogind int bus_log_create_error(int r) { return log_error_errno(r, "Failed to create bus message: %m"); } -#endif // 0 #if 0 /// UNNEEDED by elogind /** * bus_path_encode_unique() - encode unique object path @@ -1758,7 +1756,7 @@ static void request_name_destroy_callback(void *userdata) { assert(data); assert(data->n_ref > 0); - log_info("%s n_ref=%u", __func__, data->n_ref); + log_debug("%s n_ref=%u", __func__, data->n_ref); data->n_ref--; if (data->n_ref == 0) |