From 111a3aae71fa019710216cc5b7aa95b7c8db0937 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 14 Apr 2021 06:14:01 -0400 Subject: [PATCH] partition, random-seed, logind: fix log messages with %m We would print "...: Success", which is not too terrible, but not pretty either. --- src/login/logind.c | 4 ++-- src/partition/repart.c | 2 +- src/random-seed/random-seed.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/login/logind.c b/src/login/logind.c index 4887889fac..f461f03ec4 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -268,8 +268,8 @@ static int manager_enumerate_seats(Manager *m) { s = hashmap_get(m->seats, de->d_name); if (!s) { if (unlinkat(dirfd(d), de->d_name, 0) < 0) - log_warning("Failed to remove /run/systemd/seats/%s: %m", - de->d_name); + log_warning_errno(errno, "Failed to remove /run/systemd/seats/%s: %m", + de->d_name); continue; } diff --git a/src/partition/repart.c b/src/partition/repart.c index 195a909bf3..04d5bb18f4 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -3830,7 +3830,7 @@ static int parse_efi_variable_factory_reset(void) { arg_factory_reset = r; if (r) - log_notice("Honouring factory reset requested via EFI variable FactoryReset: %m"); + log_notice("Factory reset requested via EFI variable FactoryReset."); return 0; } diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c index 4caf967807..e003ca60e3 100644 --- a/src/random-seed/random-seed.c +++ b/src/random-seed/random-seed.c @@ -262,7 +262,7 @@ static int run(int argc, char *argv[]) { if (k < 0) log_debug_errno(errno, "Failed to read random data with getrandom(), falling back to /dev/urandom: %m"); else if ((size_t) k < buf_size) - log_debug("Short read from getrandom(), falling back to /dev/urandom: %m"); + log_debug("Short read from getrandom(), falling back to /dev/urandom."); else getrandom_worked = true; -- 2.25.1