inhibit: fix return value in error path
This commit is contained in:
parent
7fa0269bca
commit
6bc7a6ac2c
|
@ -304,7 +304,7 @@ static int run(int argc, char *argv[]) {
|
|||
|
||||
fd = inhibit(bus, &error);
|
||||
if (fd < 0)
|
||||
return log_error("Failed to inhibit: %s", bus_error_message(&error, fd));
|
||||
return log_error_errno(fd, "Failed to inhibit: %s", bus_error_message(&error, fd));
|
||||
|
||||
r = safe_fork("(inhibit)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_CLOSE_ALL_FDS|FORK_LOG, &pid);
|
||||
if (r < 0)
|
||||
|
|
Loading…
Reference in a new issue