]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: coldplug possible nop_job
authorypf791 <ypf791@gmail.com>
Fri, 19 Jul 2019 10:28:04 +0000 (18:28 +0800)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 17 Sep 2019 13:46:21 +0000 (13:46 +0000)
src/core/unit.c

index 52a1acafab41e4533a284e80aa8182b94b6d1d69..87a5976dcc202d30797cfa5ba7a038623491a69d 100644 (file)
@@ -3901,6 +3901,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);
 
@@ -3923,8 +3924,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;
         }