]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "systemctl: properly handle empty control group paths in "status""
authorLennart Poettering <lennart@poettering.net>
Tue, 25 Aug 2015 18:37:54 +0000 (20:37 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 25 Aug 2015 18:37:54 +0000 (20:37 +0200)
This reverts commit b04c25f9ef6359ed0ae403bdbfe4df840aba0f58.

src/systemctl/systemctl.c

index 587793fb17075c3553c72eafecd31b734ed51c37..3cb5f618687a4612cc0ef42b3404c6a0663a5ecb 100644 (file)
@@ -3635,14 +3635,7 @@ static int status_property(const char *name, sd_bus_message *m, UnitStatusInfo *
                 if (r < 0)
                         return bus_log_parse_error(r);
 
-                if (streq(name, "ControlGroup"))
-                        i->control_group = s;
-                else if (!isempty(s)) {
-                        /* For all but the cgroup path (see above) we
-                         * consider the empty string as unset. For the
-                         * cgroup path the empty string refers to the
-                         * root of the cgroup tree. */
-
+                if (!isempty(s)) {
                         if (streq(name, "Id"))
                                 i->id = s;
                         else if (streq(name, "LoadState"))
@@ -3665,6 +3658,8 @@ static int status_property(const char *name, sd_bus_message *m, UnitStatusInfo *
                                         i->control_group = e;
                         }
 #endif
+                        else if (streq(name, "ControlGroup"))
+                                i->control_group = s;
                         else if (streq(name, "StatusText"))
                                 i->status_text = s;
                         else if (streq(name, "PIDFile"))