Skip to content

Commit c5024cd

Browse files
fbuihuumartinpitt
authored andcommitted
systemctl: fix 'is-enabled' exit status on failure when executed in chroot (systemd#4773)
1 parent 730389b commit c5024cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/systemctl/systemctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6438,7 +6438,7 @@ static int unit_is_enabled(int argc, char *argv[], void *userdata) {
64386438

64396439
r = unit_file_get_state(arg_scope, arg_root, *name, &state);
64406440
if (r < 0)
6441-
return log_error_errno(state, "Failed to get unit file state for %s: %m", *name);
6441+
return log_error_errno(r, "Failed to get unit file state for %s: %m", *name);
64426442

64436443
if (IN_SET(state,
64446444
UNIT_FILE_ENABLED,

0 commit comments

Comments
 (0)