X Tutup
Skip to content

Commit 6bc7a6a

Browse files
committed
inhibit: fix return value in error path
1 parent 7fa0269 commit 6bc7a6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/login/inhibit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ static int run(int argc, char *argv[]) {
304304

305305
fd = inhibit(bus, &error);
306306
if (fd < 0)
307-
return log_error("Failed to inhibit: %s", bus_error_message(&error, fd));
307+
return log_error_errno(fd, "Failed to inhibit: %s", bus_error_message(&error, fd));
308308

309309
r = safe_fork("(inhibit)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_CLOSE_ALL_FDS|FORK_LOG, &pid);
310310
if (r < 0)

0 commit comments

Comments
 (0)
X Tutup