]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: include upheld units in dependencies
authorDavid Tardon <dtardon@redhat.com>
Sat, 16 Jul 2022 11:23:46 +0000 (13:23 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 17 Jul 2022 19:50:19 +0000 (20:50 +0100)
Fixes: #22706
src/systemctl/systemctl-util.c

index 57cb2ca26a120ea153e642e6ea20cbed9fb8ba87..b333850bec8e0e9171049d379829dfdc45dad877 100644 (file)
@@ -704,13 +704,14 @@ int maybe_extend_with_unit_dependencies(sd_bus *bus, char ***list) {
 int unit_get_dependencies(sd_bus *bus, const char *name, char ***ret) {
         _cleanup_strv_free_ char **deps = NULL;
 
-        static const struct bus_properties_map map[_DEPENDENCY_MAX][6] = {
+        static const struct bus_properties_map map[_DEPENDENCY_MAX][7] = {
                 [DEPENDENCY_FORWARD] = {
                         { "Requires",    "as", NULL, 0 },
                         { "Requisite",   "as", NULL, 0 },
                         { "Wants",       "as", NULL, 0 },
                         { "ConsistsOf",  "as", NULL, 0 },
                         { "BindsTo",     "as", NULL, 0 },
+                        { "Upholds",     "as", NULL, 0 },
                         {}
                 },
                 [DEPENDENCY_REVERSE] = {
@@ -719,6 +720,7 @@ int unit_get_dependencies(sd_bus *bus, const char *name, char ***ret) {
                         { "WantedBy",    "as", NULL, 0 },
                         { "PartOf",      "as", NULL, 0 },
                         { "BoundBy",     "as", NULL, 0 },
+                        { "UpheldBy",    "as", NULL, 0 },
                         {}
                 },
                 [DEPENDENCY_AFTER] = {