tty-ask-password-agent: show right TTY path in error message

This commit is contained in:
Lennart Poettering
2018-02-13 23:55:19 +01:00
parent 5439206bc7
commit befd657b00
@@ -372,11 +372,12 @@ static int parse_password(const char *filename, char **wall) {
tty_fd = acquire_terminal(con, ACQUIRE_TERMINAL_WAIT, USEC_INFINITY);
if (tty_fd < 0)
return log_error_errno(tty_fd, "Failed to acquire /dev/console: %m");
return log_error_errno(tty_fd, "Failed to acquire %s: %m", con);
r = reset_terminal_fd(tty_fd, true);
if (r < 0)
log_warning_errno(r, "Failed to reset terminal, ignoring: %m");
}
r = ask_password_tty(message, NULL, not_after, echo ? ASK_PASSWORD_ECHO : 0, filename, &password);