chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mount: relabel both before and after a mount, just in case
[elogind.git]
/
src
/
cgls.c
diff --git
a/src/cgls.c
b/src/cgls.c
index 6f083015edee6f83cd38019254037d1c23a65188..2bde743acf314420c9c9c2c3375facd452a172e2 100644
(file)
--- a/
src/cgls.c
+++ b/
src/cgls.c
@@
-112,8
+112,12
@@
int main(int argc, char *argv[]) {
if ((r = cg_get_by_pid(SYSTEMD_CGROUP_CONTROLLER, 1, &root)) < 0)
t = "/";
if ((r = cg_get_by_pid(SYSTEMD_CGROUP_CONTROLLER, 1, &root)) < 0)
t = "/";
- else
- t = root;
+ else {
+ if (endswith(root, "/system"))
+ root[strlen(root)-7] = 0;
+
+ t = root[0] ? root : "/";
+ }
r = show_cgroup(SYSTEMD_CGROUP_CONTROLLER, t, NULL, 0);
free(root);
r = show_cgroup(SYSTEMD_CGROUP_CONTROLLER, t, NULL, 0);
free(root);