path: root/src/core
diff options
authorYu Watanabe <>2018-05-31 23:39:31 +0900
committerSven Eden <>2018-08-24 16:47:08 +0200
commit7851cfbcac23fc8c8e167c3691a1f63fd277fa1a (patch)
treee3705f1281ae5b87b068f86390836dd2d40069ef /src/core
parent72307dc710d1300f40f62bab025b9a794f1e5d08 (diff)
path-util: introduce path_simplify()
The function is similar to path_kill_slashes() but also removes initial './', trailing '/.', and '/./' in the path. When the second argument of path_simplify() is false, then it behaves as the same as path_kill_slashes(). Hence, this also replaces path_kill_slashes() with path_simplify().
Diffstat (limited to 'src/core')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index a1e66864b..1c8245e0b 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -1520,7 +1520,7 @@ static int unit_attach_pid_to_cgroup_via_bus(Unit *u, pid_t pid, const char *suf
return -EINVAL;
pp = strjoina("/", pp, suffix_path);
- path_kill_slashes(pp);
+ path_simplify(pp, false);
r = sd_bus_call_method(u->manager->system_bus,