chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57189f7
)
Prep v232.2: cg_shift_path() : With other controllers, elogind might end up in name...
author
Sven Eden
<yamakuzure@gmx.net>
Wed, 5 Jul 2017 12:53:38 +0000
(14:53 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Wed, 5 Jul 2017 12:53:38 +0000
(14:53 +0200)
src/basic/cgroup-util.c
patch
|
blob
|
history
diff --git
a/src/basic/cgroup-util.c
b/src/basic/cgroup-util.c
index 2c7ceb71d6893015215760691c76b1af6c0ad4cb..44ab535cca2b488303da05a65c4a895499b19d1b 100644
(file)
--- a/
src/basic/cgroup-util.c
+++ b/
src/basic/cgroup-util.c
@@
-1329,7
+1329,11
@@
int cg_shift_path(const char *cgroup, const char *root, const char **shifted) {
}
p = path_startswith(cgroup, root);
+#if 0 /// With other controllers, elogind might end up in /elogind, and *p is 0
if (p && p > cgroup)
+#else
+ if (p && p[0] && (p > cgroup))
+#endif // 0
*shifted = p - 1;
else
*shifted = cgroup;