1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-01 05:47:04 +03:00

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)
(cherry picked from commit 7b535fcda495ca8a73133526484340925d754bf6)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-04-14 06:14:01 -04:00
parent 16501c1c70
commit 31589c6b36
3 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -3043,7 +3043,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;
}

View File

@ -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;