On Wed, Dec 2, 2020 at 10:23 AM Misha Gusarov <mi...@ridge.co> wrote:
> There is a problem in mount(8) that prevents it from mounting a device
> via a symlink
> that contains a : symbol:
>
> $ mount -o bind /dev/disk/by-path/pci-0000:13:00.0-scsi-0:0:3:0
> /some/mount/point
> mount: bad address '/dev/disk/by-path/pci-0000'
> $
>
> The problem stems from the following check in mount.c:
>
> // Might this be an NFS filesystem?
> if ((!mp->mnt_type || is_prefixed_with(mp->mnt_type, "nfs"))
>   && strchr(mp->mnt_fsname, ':') != NULL
> ) {

Does this help?

        // Might this be an NFS filesystem?
        if ((!mp->mnt_type || is_prefixed_with(mp->mnt_type, "nfs"))
         && strchr(mp->mnt_fsname, ':') != NULL
+        && !(vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))
        ) {
                if (!mp->mnt_type)
                        mp->mnt_type = (char*)"nfs";
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to