mirror of
https://github.com/systemd/systemd.git
synced 2025-01-07 21:18:41 +03:00
bus: use bus_log_parse_error to print message
This commit is contained in:
parent
b159831b61
commit
d67b1d18fc
@ -1322,7 +1322,7 @@ static int monitor(int argc, char **argv, int (*dump)(sd_bus_message *m, FILE *f
|
||||
|
||||
r = sd_bus_message_read(m, "s", &name);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to read lost name: %m");
|
||||
return bus_log_parse_error(r);
|
||||
|
||||
if (streq(name, unique_name))
|
||||
is_monitor = true;
|
||||
|
@ -104,7 +104,7 @@ static int match_prepare_for_sleep(sd_bus_message *message, void *userdata, sd_b
|
||||
|
||||
r = sd_bus_message_read(message, "b", &b);
|
||||
if (r < 0) {
|
||||
log_debug_errno(r, "Failed to parse PrepareForSleep signal: %m");
|
||||
bus_log_parse_error(r);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1987,7 +1987,7 @@ static int match_prepare_for_sleep(sd_bus_message *message, void *userdata, sd_b
|
||||
|
||||
r = sd_bus_message_read(message, "b", &b);
|
||||
if (r < 0) {
|
||||
log_debug_errno(r, "Failed to parse PrepareForSleep signal: %m");
|
||||
bus_log_parse_error(r);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -664,7 +664,7 @@ static int on_properties_changed(sd_bus_message *m, void *userdata, sd_bus_error
|
||||
|
||||
r = sd_bus_message_read(m, "s", &name);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to read interface name: %m");
|
||||
return bus_log_parse_error(r);
|
||||
|
||||
if (!streq_ptr(name, "org.freedesktop.timesync1.Manager"))
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user