]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: A few more uses of "unmet" for conditions
authorColin Walters <walters@verbum.org>
Mon, 10 Apr 2023 20:22:25 +0000 (16:22 -0400)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 11 Apr 2023 03:36:53 +0000 (12:36 +0900)
This is a followup to
413e8650b71d4404a7453403797f93d73d88c466
> tree-wide: Use "unmet" for condition checks, not "failed"

Since I noticed when running `systemctl status` on a recent
systemd still seeing
`Condition: start condition failed`

To recap the original rationale here for "unmet" is that it's
normal for some units to be conditional, so the term "failure"
here is too strong.

man/org.freedesktop.systemd1.xml
src/core/unit.c
src/systemctl/systemctl-show.c

index 50680e6b37af8b8a8324084e087c44bfc001295c..490c83bb9651e56840bcc810387b4ff78bf2d120 100644 (file)
@@ -2501,7 +2501,7 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
       condition is a trigger condition, whether the condition is reversed, the right hand side of the
       condition (e.g. the path in case of <varname>ConditionPathExists</varname>), and the status. The status
       can be 0, in which case the condition hasn't been checked yet, a positive value, in which case the
-      condition passed, or a negative value, in which case the condition failed. Currently only 0, +1, and -1
+      condition passed, or a negative value, in which case the condition is not met. Currently only 0, +1, and -1
       are used, but additional values may be used in the future, retaining the meaning of
       zero/positive/negative values.</para>
 
index 846d15b4151d064ad596b0b41ccc398e69f8e951..409801aed2888828cc2ab11b629efbf4736d38fd 100644 (file)
@@ -1890,12 +1890,12 @@ int unit_start(Unit *u, ActivationDetails *details) {
         if (UNIT_VTABLE(u)->once_only && dual_timestamp_is_set(&u->inactive_enter_timestamp))
                 return -ESTALE;
 
-        /* If the conditions failed, don't do anything at all. If we already are activating this call might
+        /* If the conditions were unmet, don't do anything at all. If we already are activating this call might
          * still be useful to speed up activation in case there is some hold-off time, but we don't want to
          * recheck the condition in that case. */
         if (state != UNIT_ACTIVATING &&
             !unit_test_condition(u))
-                return log_unit_debug_errno(u, SYNTHETIC_ERRNO(ECOMM), "Starting requested but condition failed. Not starting unit.");
+                return log_unit_debug_errno(u, SYNTHETIC_ERRNO(ECOMM), "Starting requested but condition not met. Not starting unit.");
 
         /* If the asserts failed, fail the entire job */
         if (state != UNIT_ACTIVATING &&
index 4a14c105dd733c065350113b6084f0c3726b8e44..6422550af48afa54409f5068630385eaafe2e365 100644 (file)
@@ -516,7 +516,7 @@ static void print_status_info(
         if (!i->condition_result && i->condition_timestamp > 0) {
                 int n = 0;
 
-                printf("  Condition: start %scondition failed%s at %s; %s\n",
+                printf("  Condition: start %scondition unmet%s at %s; %s\n",
                        ansi_highlight_yellow(), ansi_normal(),
                        FORMAT_TIMESTAMP_STYLE(i->condition_timestamp, arg_timestamp_style),
                        FORMAT_TIMESTAMP_RELATIVE(i->condition_timestamp));