1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00

logind: kill newline characters from log_error_errno() calls

log_error_errno() already adds a newline, so drop them.
This commit is contained in:
Daniel Mack 2015-04-24 21:44:51 +02:00
parent b66f29a1ea
commit c2a23db0b9
2 changed files with 14 additions and 14 deletions

View File

@ -1544,11 +1544,11 @@ static int delay_shutdown_or_sleep(
if (m->inhibit_timeout_source) {
r = sd_event_source_set_time(m->inhibit_timeout_source, timeout_val);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_time() failed: %m\n");
return log_error_errno(r, "sd_event_source_set_time() failed: %m");
r = sd_event_source_set_enabled(m->inhibit_timeout_source, SD_EVENT_ONESHOT);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_enabled() failed: %m\n");
return log_error_errno(r, "sd_event_source_set_enabled() failed: %m");
} else {
r = sd_event_add_time(m->event, &m->inhibit_timeout_source, CLOCK_MONOTONIC,
timeout_val, 0, manager_inhibit_timeout_handler, m);
@ -1859,7 +1859,7 @@ static int manager_scheduled_shutdown_handler(
r = execute_shutdown_or_sleep(m, 0, target, &error);
if (r < 0)
return log_error_errno(r, "Unable to execute transition to %s: %m\n", target);
return log_error_errno(r, "Unable to execute transition to %s: %m", target);
return 0;
}
@ -1904,16 +1904,16 @@ static int method_schedule_shutdown(sd_bus *bus, sd_bus_message *message, void *
if (m->scheduled_shutdown_timeout_source) {
r = sd_event_source_set_time(m->scheduled_shutdown_timeout_source, elapse);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_time() failed: %m\n");
return log_error_errno(r, "sd_event_source_set_time() failed: %m");
r = sd_event_source_set_enabled(m->scheduled_shutdown_timeout_source, SD_EVENT_ONESHOT);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_enabled() failed: %m\n");
return log_error_errno(r, "sd_event_source_set_enabled() failed: %m");
} else {
r = sd_event_add_time(m->event, &m->scheduled_shutdown_timeout_source,
CLOCK_REALTIME, elapse, 0, manager_scheduled_shutdown_handler, m);
if (r < 0)
return log_error_errno(r, "sd_event_add_time() failed: %m\n");
return log_error_errno(r, "sd_event_add_time() failed: %m");
}
r = free_and_strdup(&m->scheduled_shutdown_type, type);
@ -1925,16 +1925,16 @@ static int method_schedule_shutdown(sd_bus *bus, sd_bus_message *message, void *
if (m->nologin_timeout_source) {
r = sd_event_source_set_time(m->nologin_timeout_source, elapse);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_time() failed: %m\n");
return log_error_errno(r, "sd_event_source_set_time() failed: %m");
r = sd_event_source_set_enabled(m->nologin_timeout_source, SD_EVENT_ONESHOT);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_enabled() failed: %m\n");
return log_error_errno(r, "sd_event_source_set_enabled() failed: %m");
} else {
r = sd_event_add_time(m->event, &m->nologin_timeout_source,
CLOCK_REALTIME, elapse - 5 * USEC_PER_MINUTE, 0, nologin_timeout_handler, m);
if (r < 0)
return log_error_errno(r, "sd_event_add_time() failed: %m\n");
return log_error_errno(r, "sd_event_add_time() failed: %m");
}
m->scheduled_shutdown_timeout = elapse;

View File

@ -122,11 +122,11 @@ static int wall_message_timeout_handler(
if (next > 0) {
r = sd_event_source_set_time(s, n + next);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_time() failed. %m\n");
return log_error_errno(r, "sd_event_source_set_time() failed. %m");
r = sd_event_source_set_enabled(s, SD_EVENT_ONESHOT);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_enabled() failed. %m\n");
return log_error_errno(r, "sd_event_source_set_enabled() failed. %m");
}
return 0;
@ -166,16 +166,16 @@ int manager_setup_wall_message_timer(Manager *m) {
if (m->wall_message_timeout_source) {
r = sd_event_source_set_time(m->wall_message_timeout_source, n + elapse);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_time() failed. %m\n");
return log_error_errno(r, "sd_event_source_set_time() failed. %m");
r = sd_event_source_set_enabled(m->wall_message_timeout_source, SD_EVENT_ONESHOT);
if (r < 0)
return log_error_errno(r, "sd_event_source_set_enabled() failed. %m\n");
return log_error_errno(r, "sd_event_source_set_enabled() failed. %m");
} else {
r = sd_event_add_time(m->event, &m->wall_message_timeout_source,
CLOCK_REALTIME, n + elapse, 0, wall_message_timeout_handler, m);
if (r < 0)
return log_error_errno(r, "sd_event_add_time() failed. %m\n");
return log_error_errno(r, "sd_event_add_time() failed. %m");
}
return 0;