diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-02 19:10:22 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-02 19:10:22 +0100 |
commit | b4f93f562d261a163113cd15cc252c53d2fa27bb (patch) | |
tree | 9c6fab857db88148b1d906c4af37ddc658582f7d | |
parent | 665a65953076ea21be49250b8279ddb1f0f99f38 (diff) | |
download | busybox-w32-b4f93f562d261a163113cd15cc252c53d2fa27bb.tar.gz busybox-w32-b4f93f562d261a163113cd15cc252c53d2fa27bb.tar.bz2 busybox-w32-b4f93f562d261a163113cd15cc252c53d2fa27bb.zip |
mount: do not guess bind mounts as nfs
Fails as follows:
$ mount -o bind /dev/disk/by-path/pci-0000:13:00.0-scsi-0:0:3:0 /dir
mount: bad address '/dev/disk/by-path/pci-0000'
function old new delta
singlemount 1256 1273 +17
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/mount.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index cfb6b570f..dba583544 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -2066,6 +2066,7 @@ static int singlemount(struct mntent *mp, int ignore_busy) | |||
2066 | // Might this be an NFS filesystem? | 2066 | // Might this be an NFS filesystem? |
2067 | if ((!mp->mnt_type || is_prefixed_with(mp->mnt_type, "nfs")) | 2067 | if ((!mp->mnt_type || is_prefixed_with(mp->mnt_type, "nfs")) |
2068 | && strchr(mp->mnt_fsname, ':') != NULL | 2068 | && strchr(mp->mnt_fsname, ':') != NULL |
2069 | && !(vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE)) | ||
2069 | ) { | 2070 | ) { |
2070 | if (!mp->mnt_type) | 2071 | if (!mp->mnt_type) |
2071 | mp->mnt_type = (char*)"nfs"; | 2072 | mp->mnt_type = (char*)"nfs"; |