mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-28 06:35:34 +07:00
unit: signal explicitly if a condition failed in unit_start()
We shouldn't print a status message on the console if we skipped a unit due to a condition. Hence make unit_start() return -ENOEXEC in such a case which is mapped to JOB_SKIPPED which results in no console message.
This commit is contained in:
parent
bb061708d5
commit
691206668a
@ -417,7 +417,8 @@ static void job_print_status_message(Unit *u, JobType t, JobResult result) {
|
||||
switch (result) {
|
||||
|
||||
case JOB_DONE:
|
||||
unit_status_printf(u, ANSI_HIGHLIGHT_GREEN_ON " OK " ANSI_HIGHLIGHT_OFF, "Started %s", unit_description(u));
|
||||
if (u->condition_result)
|
||||
unit_status_printf(u, ANSI_HIGHLIGHT_GREEN_ON " OK " ANSI_HIGHLIGHT_OFF, "Started %s", unit_description(u));
|
||||
break;
|
||||
|
||||
case JOB_FAILED:
|
||||
|
Loading…
Reference in New Issue
Block a user