Blame SOURCES/0437-systemctl-fix-is-enabled-exit-status-on-failure-when.patch

17b0f1
From e8507d683bce9dd61adc3fa5d19ec35e3caadff9 Mon Sep 17 00:00:00 2001
17b0f1
From: Franck Bui <fbui@suse.com>
17b0f1
Date: Wed, 30 Nov 2016 18:27:42 +0100
17b0f1
Subject: [PATCH] systemctl: fix 'is-enabled' exit status on failure when
17b0f1
 executed in chroot (#4773)
17b0f1
17b0f1
(cherry picked from commit c5024cd05c194b93ae960bf38e567d3d998f2a03)
17b0f1
Resolves: #1413964
17b0f1
---
17b0f1
 src/systemctl/systemctl.c | 2 +-
17b0f1
 1 file changed, 1 insertion(+), 1 deletion(-)
17b0f1
17b0f1
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
17b0f1
index a578897d9e..1e1009f388 100644
17b0f1
--- a/src/systemctl/systemctl.c
17b0f1
+++ b/src/systemctl/systemctl.c
17b0f1
@@ -5739,7 +5739,7 @@ static int unit_is_enabled(sd_bus *bus, char **args) {
17b0f1
 
17b0f1
                         r = unit_file_get_state(arg_scope, arg_root, *name, &state);
17b0f1
                         if (r < 0)
17b0f1
-                                return log_error_errno(state, "Failed to get unit file state for %s: %m", *name);
17b0f1
+                                return log_error_errno(r, "Failed to get unit file state for %s: %m", *name);
17b0f1
 
17b0f1
                         if (state == UNIT_FILE_ENABLED ||
17b0f1
                             state == UNIT_FILE_ENABLED_RUNTIME ||