[systemd-devel] [PATCH] tty-ask-password-agent: return negative errno
Florian Albrechtskirchinger
falbrechtskirchinger at gmail.com
Thu Apr 3 12:17:20 PDT 2014
Return negative errno in wall_tty_block(). get_ctty_devnr() already
returns a negative errno in case of failure, no need to negate it again.
Reported-by: Simon <hwold at odai.homelinux.net>
---
src/tty-ask-password-agent/tty-ask-password-agent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 1d067af..3203474 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -432,7 +432,7 @@ static int wall_tty_block(void) {
r = get_ctty_devnr(0, &devnr);
if (r < 0)
- return -r;
+ return r;
if (asprintf(&p, "/run/systemd/ask-password-block/%u:%u", major(devnr), minor(devnr)) < 0)
return -ENOMEM;
--
1.9.1
More information about the systemd-devel
mailing list