summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-04-14 06:14:01 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-15 19:32:59 +0200
commit7b535fcda495ca8a73133526484340925d754bf6 (patch)
tree1e1a0e7b381c649934701f0156094ee53290a2e1
parent645c85022ac6c035ccdd0590db687c5be1147e85 (diff)
downloadsystemd-7b535fcda495ca8a73133526484340925d754bf6.tar.gz
partition, random-seed, logind: fix log messages with %m
We would print "...: Success", which is not too terrible, but not pretty either. (cherry picked from commit 111a3aae71fa019710216cc5b7aa95b7c8db0937) (cherry picked from commit c032a26df67903e0c65150b5cc68ade35aa47c03)
-rw-r--r--src/login/logind.c4
-rw-r--r--src/partition/repart.c2
-rw-r--r--src/random-seed/random-seed.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/login/logind.c b/src/login/logind.c
index 3ddc7a074a..9df95e7234 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 6d7e51938a..9ed79caa87 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -3711,7 +3711,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 8f8766cdd7..ec009781b7 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;