summaryrefslogtreecommitdiffstats
path: root/src/core/service.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-10-01 14:58:55 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-10-01 15:05:27 +0200
commit28a2dfe8014327a884bef36667c1cf94f547e716 (patch)
tree6a4a9aa55c4b0e1e3c5596d382e037d96b1a51bc /src/core/service.c
parentcore: remove unused prototypes (diff)
downloadsystemd-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.c2
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.");