diff options
author | ypf791 <ypf791@gmail.com> | 2019-07-19 18:28:04 +0800 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-09-21 23:01:49 +0200 |
commit | a20a2157a85dd277c5dc1398fd75f565ca941933 (patch) | |
tree | bba14ba060fc0871ddb84eed08a5a952707c84ee | |
parent | eb552417420fa9680b508519e926b140d5a0be25 (diff) | |
download | systemd-a20a2157a85dd277c5dc1398fd75f565ca941933.tar.gz |
core: coldplug possible nop_job
(cherry picked from commit b49e14d5f3081dfcd363d8199a14c0924ae9152f)
-rw-r--r-- | src/core/unit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index 64eb12733a..cedcb3f5b3 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -3900,6 +3900,7 @@ int unit_add_node_dependency(Unit *u, const char *what, bool wants, UnitDependen int unit_coldplug(Unit *u) { int r = 0, q; char **i; + Job *uj; assert(u); @@ -3922,8 +3923,9 @@ int unit_coldplug(Unit *u) { r = q; } - if (u->job) { - q = job_coldplug(u->job); + uj = u->job ?: u->nop_job; + if (uj) { + q = job_coldplug(uj); if (q < 0 && r >= 0) r = q; } |