From: Lennart Poettering Date: Wed, 26 Aug 2020 21:10:50 +0000 (+0200) Subject: tty-ask-pw-agent: properly propagate error X-Git-Tag: v247-rc1~355^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4fd6cd3f575eb7e1452a74c2e35548739e3b252;p=thirdparty%2Fsystemd.git tty-ask-pw-agent: properly propagate error --- 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 096b90c2aa3..87779a4dd6e 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) {