mount: realpath is not needed as mount will realpath the path
authorRobert Swiecki <robert@swiecki.net>
Tue, 3 Oct 2017 16:37:34 +0000 (18:37 +0200)
committerRobert Swiecki <robert@swiecki.net>
Tue, 3 Oct 2017 16:37:34 +0000 (18:37 +0200)
mount.c

diff --git a/mount.c b/mount.c
index 33a4091..91c1c79 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -445,21 +445,6 @@ bool mountAddMountPt(struct nsjconf_t * nsjconf, const char *src, const char *ds
                p->dst = utilStrDup(dst);
        }
 
-       /* Try to canonicalize/realpath the source path if it's mount --bind */
-       if (p->src && (flags & MS_BIND)) {
-               const char *rp = realpath(p->src, NULL);
-               if (rp) {
-                       free((void *)p->src);
-                       p->src = rp;
-               } else {
-                       if (mandatory) {
-                               PLOG_W("realpath('%s') failed", p->src);
-                       } else {
-                               PLOG_D("realpath('%s') failed", p->src);
-                       }
-               }
-       }
-
        p->fs_type = utilStrDup(fstype);
        p->options = utilStrDup(options);
        p->flags = flags;