summaryrefslogtreecommitdiff
path: root/src/firstboot
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-06 16:27:24 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-06 16:27:24 +0200
commit0084360296429b2068c1a4d4d4263083a8963b02 (patch)
treeb69d8a0da04e8c36f954a2449d1112720a4819ef /src/firstboot
parentc7ddad5148de6e41445f62a80fb6846dce1a6856 (diff)
downloadsystemd-0084360296429b2068c1a4d4d4263083a8963b02.tar.gz
ask-password: various modernizations
Primarily clean-up error logging: log either all or no error messages in the various functions. Mostly this means the actual password querying calls no longer will log on their own, but the callers have to do so. Contains various other fixes too, for example ports some code over to use the clean-up macro. Should contain no functional changes.
Diffstat (limited to 'src/firstboot')
-rw-r--r--src/firstboot/firstboot.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index 4f0c669ca1..8c0724a0e7 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -477,9 +477,8 @@ static int prompt_root_password(void) {
r = ask_password_tty(msg2, 0, false, NULL, &b);
if (r < 0) {
- log_error_errno(r, "Failed to query root password: %m");
clear_string(a);
- return r;
+ return log_error_errno(r, "Failed to query root password: %m");
}
if (!streq(a, b)) {