[systemd-devel] [PATCH] fstab-generator: avoid mangling mount source and dest

Dave Reisner dreisner at archlinux.org
Sat Jun 2 19:18:20 PDT 2012


This can invalidate otherwise valid source paths with trailing slashes,
such as "host:/" in the case of a network mount. We don't really have
any business touching these anyway, since we'll just pass this to
/bin/mount, which sanitizes the paths for us.
---
 src/fstab-generator/fstab-generator.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 8419a0c..b34a6b7 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -470,12 +470,6 @@ static int parse_fstab(void) {
                         goto finish;
                 }
 
-                if (is_path(what))
-                        path_kill_slashes(what);
-
-                if (is_path(where))
-                        path_kill_slashes(where);
-
                 log_debug("Found entry what=%s where=%s type=%s", what, where, me->mnt_type);
 
                 if (streq(me->mnt_type, "swap"))
-- 
1.7.10.3



More information about the systemd-devel mailing list