[systemd-devel] [PATCH 2/3] ask-password: mention magic key to start over
Lennart Poettering
lennart at poettering.net
Tue Mar 15 19:58:24 PDT 2011
On Wed, 16.03.11 03:50, Jan Engelhardt (jengelh at medozas.de) wrote:
Does this patch really make sense? C-u is in no way magic here, it works
on every terminal. I am not sure why we should mention this here
explicitly.
> Signed-off-by: Jan Engelhardt <jengelh at medozas.de>
> ---
> src/ask-password-api.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/ask-password-api.c b/src/ask-password-api.c
> index 9c3dad9..66bf480 100644
> --- a/src/ask-password-api.c
> +++ b/src/ask-password-api.c
> @@ -77,8 +77,8 @@ int ask_password_tty(
>
> loop_write(ttyfd, "\x1B[1m", 4, false);
> loop_write(ttyfd, message, strlen(message), false);
> - loop_write(ttyfd, " ", 1, false);
> loop_write(ttyfd, "\x1B[0m", 4, false);
> + loop_write(ttyfd, " (Ctrl-U to clear) ", 19, false);
>
> new_termios = old_termios;
> new_termios.c_lflag &= ~(ICANON|ECHO);
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list