From a1c111c2d12429d29dd3d167308d693c2efe245b Mon Sep 17 00:00:00 2001 From: Marko Myllynen Date: Tue, 9 Oct 2018 17:13:34 +0300 Subject: [PATCH] More polite passphrase prompt Instead of Please enter passphrase for disk ! use Please enter passphrase for disk : which is more polite and matches Plymouth convention. --- src/cryptsetup/cryptsetup.c | 4 ++-- src/shared/dissect-image.c | 2 +- src/tty-ask-password-agent/tty-ask-password-agent.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index b590d70676..1ec40198b4 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -357,7 +357,7 @@ static int get_password(const char *vol, const char *src, usec_t until, bool acc name = name_buffer ? name_buffer : vol; - if (asprintf(&text, "Please enter passphrase for disk %s!", name) < 0) + if (asprintf(&text, "Please enter passphrase for disk %s:", name) < 0) return log_oom(); id = strjoina("cryptsetup:", disk_path); @@ -373,7 +373,7 @@ static int get_password(const char *vol, const char *src, usec_t until, bool acc assert(strv_length(passwords) == 1); - if (asprintf(&text, "Please enter passphrase for disk %s! (verification)", name) < 0) + if (asprintf(&text, "Please enter passphrase for disk %s (verification):", name) < 0) return log_oom(); id = strjoina("cryptsetup-verification:", disk_path); diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 0429a55a9c..b6e0534b5d 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -1095,7 +1095,7 @@ int dissected_image_decrypt_interactively( z = strv_free(z); - r = ask_password_auto("Please enter image passphrase!", NULL, "dissect", "dissect", USEC_INFINITY, 0, &z); + r = ask_password_auto("Please enter image passphrase:", NULL, "dissect", "dissect", USEC_INFINITY, 0, &z); if (r < 0) return log_error_errno(r, "Failed to query for passphrase: %m"); diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 2aa97a8d08..690c7b0de9 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -323,7 +323,7 @@ static int parse_password(const char *filename, char **wall) { if (asprintf(&_wall, "%s%sPassword entry required for \'%s\' (PID %u).\r\n" - "Please enter password with the systemd-tty-ask-password-agent tool!", + "Please enter password with the systemd-tty-ask-password-agent tool:", strempty(*wall), *wall ? "\r\n\r\n" : "", message,