diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-08-26 23:10:50 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-08-26 23:10:50 +0200 |
commit | a4fd6cd3f575eb7e1452a74c2e35548739e3b252 (patch) | |
tree | 8c669e57fd0b1337e66538a78f95693139b734e4 | |
parent | tty-ask-pw-agent: the message string might not be set (diff) | |
download | systemd-a4fd6cd3f575eb7e1452a74c2e35548739e3b252.tar.xz systemd-a4fd6cd3f575eb7e1452a74c2e35548739e3b252.zip |
tty-ask-pw-agent: properly propagate error
-rw-r--r-- | src/tty-ask-password-agent/tty-ask-password-agent.c | 5 |
1 files changed, 2 insertions, 3 deletions
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 096b90c2aa..87779a4dd6 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -143,8 +143,7 @@ static int agent_ask_password_tty( const char *flag_file, char ***ret) { - int tty_fd = -1; - int r; + int tty_fd = -1, r; if (arg_console) { const char *con = arg_device ?: "/dev/console"; @@ -166,7 +165,7 @@ static int agent_ask_password_tty( release_terminal(); } - return 0; + return r; } static int process_one_password_file(const char *filename) { |