summaryrefslogtreecommitdiff
path: root/src/core/job.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2022-08-31 16:39:03 -0400
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-09-01 15:03:40 +0900
commit413e8650b71d4404a7453403797f93d73d88c466 (patch)
treeeb65f6ddda014e3a81fb74869f9ffa24fe182a71 /src/core/job.c
parent133ac84e60a9cd29cf0c682d6c05d88a56511b8d (diff)
downloadsystemd-413e8650b71d4404a7453403797f93d73d88c466.tar.gz
tree-wide: Use "unmet" for condition checks, not "failed"
Often I end up debugging a problem on a system, and I do e.g. `journalctl --grep=failed|error`. The use of the term "failed" for condition checks adds a *lot* of unnecessary noise into this. Now, I know this regexp search isn't precise, but it has proven to be useful to me. I think "failed" is too strong of a term as a baseline, and also just stands out to e.g. humans watching their servers boot or whatever. The term "met condition" is fairly widely used, e.g. https://stackoverflow.com/questions/63751794/what-does-the-condition-is-met-exactly-mean-in-programming-languages Use that instead.
Diffstat (limited to 'src/core/job.c')
-rw-r--r--src/core/job.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/job.c b/src/core/job.c
index dd8d858bd2..7905561cca 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -610,7 +610,7 @@ static const char* job_done_message_format(Unit *u, JobType t, JobResult result)
assert(t >= 0);
assert(t < _JOB_TYPE_MAX);
- /* Show condition check message if the job did not actually do anything due to failed condition. */
+ /* Show condition check message if the job did not actually do anything due to unmet condition. */
if (t == JOB_START && result == JOB_DONE && !u->condition_result)
return "Condition check resulted in %s being skipped.";
@@ -702,7 +702,7 @@ static void job_emit_done_message(Unit *u, uint32_t job_id, JobType t, JobResult
bool console_only = do_console && log_on_console();
if (t == JOB_START && result == JOB_DONE && !u->condition_result) {
- /* No message on the console if the job did not actually do anything due to failed condition. */
+ /* No message on the console if the job did not actually do anything due to unmet condition. */
if (console_only)
return;
else
@@ -716,13 +716,13 @@ static void job_emit_done_message(Unit *u, uint32_t job_id, JobType t, JobResult
c = t == JOB_START && result == JOB_DONE ? unit_find_failed_condition(u) : NULL;
if (c) {
- /* Special case units that were skipped because of a failed condition check so that
+ /* Special case units that were skipped because of a unmet condition check so that
* we can add more information to the message. */
if (c->trigger)
log_unit_struct(
u,
job_done_messages[result].log_level,
- LOG_MESSAGE("%s was skipped because all trigger condition checks failed.",
+ LOG_MESSAGE("%s was skipped because no trigger condition checks were met.",
ident),
"JOB_ID=%" PRIu32, job_id,
"JOB_TYPE=%s", job_type_to_string(t),
@@ -733,7 +733,7 @@ static void job_emit_done_message(Unit *u, uint32_t job_id, JobType t, JobResult
log_unit_struct(
u,
job_done_messages[result].log_level,
- LOG_MESSAGE("%s was skipped because of a failed condition check (%s=%s%s).",
+ LOG_MESSAGE("%s was skipped because of an unmet condition check (%s=%s%s).",
ident,
condition_type_to_string(c->type),
c->negate ? "!" : "",