summaryrefslogtreecommitdiff
path: root/src/basic/mount-util.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-31 23:39:31 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-06-03 23:39:26 +0900
commit858d36c1ec7cd1173c60e8ab17b8425325253e38 (patch)
tree147284bf1b34c8917aa67bfdd2c15f672a0471af /src/basic/mount-util.c
parentaff443013640ba783c89c9032ebd5a557f2fc11e (diff)
downloadsystemd-858d36c1ec7cd1173c60e8ab17b8425325253e38.tar.gz
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/basic/mount-util.c')
-rw-r--r--src/basic/mount-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/mount-util.c b/src/basic/mount-util.c
index 2774e48cf3..68a83ebae7 100644
--- a/src/basic/mount-util.c
+++ b/src/basic/mount-util.c
@@ -413,7 +413,7 @@ int bind_remount_recursive_with_mountinfo(const char *prefix, bool ro, char **bl
if (!cleaned)
return -ENOMEM;
- path_kill_slashes(cleaned);
+ path_simplify(cleaned, false);
done = set_new(&path_hash_ops);
if (!done)