tty-ask-password-agent: show right TTY path in error message
authorLennart Poettering <lennart@poettering.net>
Tue, 13 Feb 2018 22:55:19 +0000 (23:55 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 Feb 2018 22:55:19 +0000 (23:55 +0100)
src/tty-ask-password-agent/tty-ask-password-agent.c

index 871ac27..ed9adab 100644 (file)
@@ -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);