tty-ask-password-agent: return negative errno

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@odai.homelinux.net>
This commit is contained in:
Florian Albrechtskirchinger 2014-04-03 21:17:20 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent b3ae710c25
commit ee0e4cca5a

View file

@ -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;