chiark / gitweb /
locale: make sure we don't merge configuration settings from different sources
[elogind.git] / src / manager.c
index ff1c70b4845762446c80382b1051a528aa0e7962..27c8aa4c962e215f413f51afbbf7019e469131ce 100644 (file)
@@ -982,7 +982,7 @@ static int transaction_verify_order_one(Manager *m, Job *j, Job *from, unsigned
 
 
                 if (delete) {
-                        log_warning("Breaking ordering cycle by deleting job %s/%s", k->unit->meta.id, job_type_to_string(k->type));
+                        log_warning("Breaking ordering cycle by deleting job %s/%s", delete->unit->meta.id, job_type_to_string(delete->type));
                         transaction_delete_unit(m, delete->unit);
                         return -EAGAIN;
                 }
@@ -1535,7 +1535,7 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
                 return -EPERM;
         }
 
-        log_debug("Trying to enqueue job %s/%s", unit->meta.id, job_type_to_string(type));
+        log_debug("Trying to enqueue job %s/%s/%s", unit->meta.id, job_type_to_string(type), job_mode_to_string(mode));
 
         if ((r = transaction_add_job_and_dependencies(m, type, unit, NULL, true, override, false, e, &ret)) < 0) {
                 transaction_abort(m);
@@ -2591,17 +2591,10 @@ bool manager_unit_pending_inactive(Manager *m, const char *name) {
         assert(name);
 
         /* Returns true if the unit is inactive or going down */
-
         if (!(u = manager_get_unit(m, name)))
                 return true;
 
-        if (UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(u)))
-                return true;
-
-        if (u->meta.job && u->meta.job->type == JOB_STOP)
-                return true;
-
-        return false;
+        return unit_pending_inactive(u);
 }
 
 static const char* const manager_running_as_table[_MANAGER_RUNNING_AS_MAX] = {