inhibit: fix return value in error path

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-11-20 09:41:32 +01:00
parent 7fa0269bca
commit 6bc7a6ac2c

View file

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