[systemd-commits] 3 commits - src/bootchart src/login src/systemctl
Daniel Mack
zonque at kemper.freedesktop.org
Fri Apr 24 12:52:13 PDT 2015
src/bootchart/bootchart.c | 2 +-
src/bootchart/svg.c | 4 ++--
src/login/logind-dbus.c | 18 +++++++++---------
src/login/logind-utmp.c | 10 +++++-----
src/systemctl/systemctl.c | 4 ++--
5 files changed, 19 insertions(+), 19 deletions(-)
New commits:
commit 5d236c1f420b7a717b8f40415c0e0ae7d52f3aba
Author: Daniel Mack <daniel at zonque.org>
Date: Fri Apr 24 21:51:43 2015 +0200
bootchart: kill newline characters from log_error_errno() calls
diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
index 65cb322..45fab92 100644
--- a/src/bootchart/bootchart.c
+++ b/src/bootchart/bootchart.c
@@ -488,7 +488,7 @@ int main(int argc, char *argv[]) {
log_start, interval, overrun);
if (r < 0) {
- log_error_errno(r, "Error generating svg file: %m\n");
+ log_error_errno(r, "Error generating svg file: %m");
return EXIT_FAILURE;
}
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index c63fd04..0132475 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -157,7 +157,7 @@ static int svg_title(FILE *of, const char *build, int pscount, double log_start,
r = read_one_line_file("/proc/cmdline", &cmdline);
if (r < 0) {
- log_error_errno(r, "Unable to read cmdline: %m\n");
+ log_error_errno(r, "Unable to read cmdline: %m");
return r;
}
@@ -192,7 +192,7 @@ static int svg_title(FILE *of, const char *build, int pscount, double log_start,
/* CPU type */
r = read_full_file("/proc/cpuinfo", &buf, NULL);
if (r < 0)
- return log_error_errno(r, "Unable to read cpuinfo: %m\n");
+ return log_error_errno(r, "Unable to read cpuinfo: %m");
cpu = strstr(buf, "model name");
if (!cpu) {
commit d3a2a05329676098faa07529f369a19ed8710723
Author: Daniel Mack <daniel at zonque.org>
Date: Fri Apr 24 21:50:36 2015 +0200
systemctl: kill newline characters from log_error_errno() calls
log_error_errno() already adds a newline, so drop them.
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 1212673..eb9737d 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -7290,7 +7290,7 @@ static int halt_main(sd_bus *bus) {
r = sd_bus_open_system(&b);
if (r < 0)
- return log_error_errno(r, "Unable to open system bus: %m\n");
+ return log_error_errno(r, "Unable to open system bus: %m");
m = strv_join(arg_wall, " ");
if (!m)
@@ -7467,7 +7467,7 @@ int main(int argc, char*argv[]) {
r = sd_bus_open_system(&b);
if (r < 0)
- return log_error_errno(r, "Unable to open system bus: %m\n");
+ return log_error_errno(r, "Unable to open system bus: %m");
if (arg_wall) {
m = strv_join(arg_wall, " ");
commit c2a23db0b91faca3795099fd4b41587bac170ff7
Author: Daniel Mack <daniel at zonque.org>
Date: Fri Apr 24 21:44:51 2015 +0200
logind: kill newline characters from log_error_errno() calls
log_error_errno() already adds a newline, so drop them.
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 1eda3c2..880fbf7 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -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;
diff --git a/src/login/logind-utmp.c b/src/login/logind-utmp.c
index 9bbffe3..1e13ff0 100644
--- a/src/login/logind-utmp.c
+++ b/src/login/logind-utmp.c
@@ -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;
More information about the systemd-commits
mailing list