diff options
author | Daniel Mack <github@zonque.org> | 2015-08-25 23:57:28 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-08-25 23:57:28 +0200 |
commit | a0cb22c4751133a7ad744323bb4d774d8040ee7c (patch) | |
tree | 915578af78cd184d53730b99716e0fe97bcf84e6 /src/systemctl/systemctl.c | |
parent | d8b7e75f517dad8c1a2dfdf3c82dd6ee9e992391 (diff) | |
parent | 98bac6058c919071ba6b7860b925decacafdc822 (diff) |
Merge pull request #1040 from poettering/cgroup-path-fix
fix "systemctl status idontexist.service" showing the full cgroup tree
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r-- | src/systemctl/systemctl.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 587793fb17..3cb5f61868 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -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")) |