chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cg_shift_path(): Do not shift if cgroup and root are equal
[elogind.git]
/
src
/
basic
/
cgroup-util.c
diff --git
a/src/basic/cgroup-util.c
b/src/basic/cgroup-util.c
index 98a353ddb079af1b6d23762613d0a1cb5a46f703..f7a892380a7e4975dd439ca22e0470e251ca6c70 100644
(file)
--- a/
src/basic/cgroup-util.c
+++ b/
src/basic/cgroup-util.c
@@
-1203,10
+1203,11
@@
int cg_shift_path(const char *cgroup, const char *root, const char **shifted) {
return r;
root = rt;
+ log_debug_elogind("Determined root path: \"%s\"", root);
}
p = path_startswith(cgroup, root);
- if (p && p
> cgroup
)
+ if (p && p
[0] && (p > cgroup)
)
*shifted = p - 1;
else
*shifted = cgroup;