]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze-dot: also show BindsTo= in --require
authorMike Yuan <me@yhndnzj.com>
Fri, 22 Mar 2024 19:18:42 +0000 (03:18 +0800)
committerMike Yuan <me@yhndnzj.com>
Sat, 23 Mar 2024 17:28:28 +0000 (01:28 +0800)
man/systemd-analyze.xml
src/analyze/analyze-dot.c

index 639a7231cb21eff922333ad00a190fa38ef8c5d6..ca108c5cf9d35f00c45d13764266e18d17d985e1 100644 (file)
@@ -1018,16 +1018,12 @@ x86-64      native</programlisting>
         <term><option>--order</option></term>
         <term><option>--require</option></term>
 
-        <listitem><para>When used in conjunction with the
-        <command>dot</command> command (see above), selects which
-        dependencies are shown in the dependency graph. If
-        <option>--order</option> is passed, only dependencies of type
-        <varname>After=</varname> or <varname>Before=</varname> are
-        shown. If <option>--require</option> is passed, only
-        dependencies of type <varname>Requires=</varname>,
-        <varname>Requisite=</varname>,
-        <varname>Wants=</varname> and <varname>Conflicts=</varname>
-        are shown. If neither is passed, this shows dependencies of
+        <listitem><para>When used in conjunction with the <command>dot</command> command (see above),
+        selects which dependencies are shown in the dependency graph. If <option>--order</option> is passed,
+        only dependencies of type <varname>After=</varname> or <varname>Before=</varname> are shown.
+        If <option>--require</option> is passed, only dependencies of type <varname>Requires=</varname>,
+        <varname>Requisite=</varname>, <varname>BindsTo=</varname>, <varname>Wants=</varname>, and
+        <varname>Conflicts=</varname> are shown. If neither is passed, this shows dependencies of
         all these types.</para>
 
         <xi:include href="version-info.xml" xpointer="v198"/></listitem>
index abb594ad0a0fb7ab632d3b05975d310d15a41a61..9e92d59bceeeeb55b3318a9c20afa7cfd3255d11 100644 (file)
@@ -79,6 +79,10 @@ static int graph_one(
                 if (r < 0)
                         return r;
 
+                r = graph_one_property(bus, u, "BindsTo", "gold", patterns, from_patterns, to_patterns);
+                if (r < 0)
+                        return r;
+
                 r = graph_one_property(bus, u, "Wants", "grey66", patterns, from_patterns, to_patterns);
                 if (r < 0)
                         return r;
@@ -182,6 +186,7 @@ int verb_dot(int argc, char *argv[], void *userdata) {
 
         log_info("   Color legend: black     = Requires\n"
                  "                 dark blue = Requisite\n"
+                 "                 gold      = BindsTo\n"
                  "                 dark grey = Wants\n"
                  "                 red       = Conflicts\n"
                  "                 green     = After\n");