summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index a950605503..1c7edd5a58 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5260,7 +5260,7 @@ static int talk_initctl(void) {
r = loop_write(fd, &request, sizeof(request), false) != sizeof(request);
if (r) {
log_error("Failed to write to "INIT_FIFO": %m");
- return errno ? -errno : -EIO;
+ return errno > 0 ? -errno : -EIO;
}
return 1;