X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmanager.c;h=e2f13b20ec52d2913fceac70e5f10f00b99dc237;hb=18ffdfda48c327f56cac0aabdc6bada91cc9b7df;hp=bc589bacc7ffd8e1c17f0d6ac7d2e8b8b2741a1a;hpb=60dc72b563cdd4166cc6cb4e3c790bdfe1570ad2;p=elogind.git diff --git a/src/manager.c b/src/manager.c index bc589bacc..e2f13b20e 100644 --- a/src/manager.c +++ b/src/manager.c @@ -989,7 +989,7 @@ static int transaction_verify_order_one(Manager *m, Job *j, Job *from, unsigned log_error("Unable to break cycle"); - dbus_set_error(e, BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC, "Transaction order is cyclic. See logs for details."); + dbus_set_error(e, BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC, "Transaction order is cyclic. See system logs for details."); return -ENOEXEC; } @@ -1403,7 +1403,7 @@ static int transaction_add_job_and_dependencies( } if (type != JOB_STOP && unit->meta.load_state == UNIT_ERROR) { - dbus_set_error(e, BUS_ERROR_LOAD_FAILED, "Unit %s failed to load: %s. You might find more information in the logs.", + dbus_set_error(e, BUS_ERROR_LOAD_FAILED, "Unit %s failed to load: %s. You might find more information in the system logs.", unit->meta.id, strerror(-unit->meta.load_error)); return -EINVAL; @@ -2584,6 +2584,19 @@ int manager_set_console(Manager *m, const char *console) { return 0; } +bool manager_unit_pending_inactive(Manager *m, const char *name) { + Unit *u; + + assert(m); + assert(name); + + /* Returns true if the unit is inactive or going down */ + if (!(u = manager_get_unit(m, name))) + return true; + + return unit_pending_inactive(u); +} + static const char* const manager_running_as_table[_MANAGER_RUNNING_AS_MAX] = { [MANAGER_SYSTEM] = "system", [MANAGER_SESSION] = "session"