diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-05-31 23:39:31 +0900 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | 7851cfbcac23fc8c8e167c3691a1f63fd277fa1a (patch) | |
tree | e3705f1281ae5b87b068f86390836dd2d40069ef /src/basic/mount-util.c | |
parent | 72307dc710d1300f40f62bab025b9a794f1e5d08 (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/basic/mount-util.c')
-rw-r--r-- | src/basic/mount-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/mount-util.c b/src/basic/mount-util.c index 9d1f34e08..76c0969d4 100644 --- a/src/basic/mount-util.c +++ b/src/basic/mount-util.c @@ -414,7 +414,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) |