From 87ae54533c6ad7047a152b7238f682eda334a9e0 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 7 Apr 2023 18:44:22 +0900 Subject: [PATCH] update-utmp: update log message --- src/update-utmp/update-utmp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c index 5656ca2761..2f6d582da9 100644 --- a/src/update-utmp/update-utmp.c +++ b/src/update-utmp/update-utmp.c @@ -165,10 +165,9 @@ static int on_runlevel(int argc, char *argv[], void *userdata) { /* First, get last runlevel */ r = utmp_get_runlevel(&previous, NULL); - if (r < 0) { if (!IN_SET(r, -ESRCH, -ENOENT)) - return log_error_errno(r, "Failed to get current runlevel: %m"); + return log_error_errno(r, "Failed to get the last runlevel from utmp: %m"); previous = 0; } @@ -178,7 +177,7 @@ static int on_runlevel(int argc, char *argv[], void *userdata) { if (runlevel < 0) return runlevel; if (runlevel == 0) { - log_warning("Failed to get new runlevel, utmp update skipped."); + log_warning("Failed to get the current runlevel, utmp update skipped."); return 0; }