mirror of
https://github.com/systemd/systemd.git
synced 2024-11-06 08:26:52 +03:00
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:
parent
b3ae710c25
commit
ee0e4cca5a
Notes:
Zbigniew Jędrzejewski-Szmek
2014-04-07 12:41:12 -04:00
Backport: bugfix
@ -432,7 +432,7 @@ static int wall_tty_block(void) {
|
|||||||
|
|
||||||
r = get_ctty_devnr(0, &devnr);
|
r = get_ctty_devnr(0, &devnr);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return -r;
|
return r;
|
||||||
|
|
||||||
if (asprintf(&p, "/run/systemd/ask-password-block/%u:%u", major(devnr), minor(devnr)) < 0)
|
if (asprintf(&p, "/run/systemd/ask-password-block/%u:%u", major(devnr), minor(devnr)) < 0)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
Loading…
Reference in New Issue
Block a user