diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-01 14:58:55 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-01 15:05:27 +0200 |
commit | 28a2dfe8014327a884bef36667c1cf94f547e716 (patch) | |
tree | 6a4a9aa55c4b0e1e3c5596d382e037d96b1a51bc /src/core/service.c | |
parent | core: remove unused prototypes (diff) | |
download | systemd-28a2dfe8014327a884bef36667c1cf94f547e716.tar.xz systemd-28a2dfe8014327a884bef36667c1cf94f547e716.zip |
core: add helper function to check job status
Since job.h includes unit.h, and unit.h includes job.h, imports need to
be adjusted to make sure unit.h is included first if the helper is used.
Diffstat (limited to 'src/core/service.c')
-rw-r--r-- | src/core/service.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/service.c b/src/core/service.c index 71befcddc8..8e313f8e90 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2245,7 +2245,7 @@ static void service_enter_restart(Service *s) { assert(s); - if (UNIT(s)->job && UNIT(s)->job->type == JOB_STOP) { + if (unit_has_job_type(UNIT(s), JOB_STOP)) { /* Don't restart things if we are going down anyway */ log_unit_info(UNIT(s), "Stop job pending for unit, delaying automatic restart."); |