summaryrefslogtreecommitdiffstats
path: root/src/fstab-generator
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-31 16:39:31 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-06-03 16:39:26 +0200
commit858d36c1ec7cd1173c60e8ab17b8425325253e38 (patch)
tree147284bf1b34c8917aa67bfdd2c15f672a0471af /src/fstab-generator
parentnetwork: avoid temporary variables for parsing, use TAKE_PTR (#9166) (diff)
downloadsystemd-858d36c1ec7cd1173c60e8ab17b8425325253e38.tar.xz
systemd-858d36c1ec7cd1173c60e8ab17b8425325253e38.zip
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/fstab-generator')
-rw-r--r--src/fstab-generator/fstab-generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 5c7e1df8f1..daa8f5cd16 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -543,7 +543,7 @@ static int parse_fstab(bool initrd) {
return log_oom();
if (is_path(where)) {
- path_kill_slashes(where);
+ path_simplify(where, false);
/* Follow symlinks here; see 5261ba901845c084de5a8fd06500ed09bfb0bd80 which makes sense for
* mount units, but causes problems since it historically worked to have symlinks in e.g.