From 2eb072e493901cb8e674667988873e22033197cd Mon Sep 17 00:00:00 2001 From: Brian Feldman Date: Sun, 10 Oct 1999 15:52:21 +0000 Subject: [PATCH] Let a file with '@' or ':' in it take precedence over defaulting to nfs. --- sbin/mount/mount.c | 6 ++++-- sbin/mount_ifs/mount.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index b84696a2944d..d30252271782 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -258,10 +258,12 @@ main(argc, argv) case 2: /* * If -t flag has not been specified, and spec contains either - * a ':' or a '@' then assume that an NFS filesystem is being + * a ':' or a '@', and the spec is not a file with those + * characters, then assume that an NFS filesystem is being * specified ala Sun. */ - if (vfslist == NULL && strpbrk(argv[0], ":@") != NULL) + if (vfslist == NULL && strpbrk(argv[0], ":@") != NULL && + access(argv[0], 0) == -1) vfstype = "nfs"; rval = mountfs(vfstype, argv[0], argv[1], init_flags, options, NULL); diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c index b84696a2944d..d30252271782 100644 --- a/sbin/mount_ifs/mount.c +++ b/sbin/mount_ifs/mount.c @@ -258,10 +258,12 @@ main(argc, argv) case 2: /* * If -t flag has not been specified, and spec contains either - * a ':' or a '@' then assume that an NFS filesystem is being + * a ':' or a '@', and the spec is not a file with those + * characters, then assume that an NFS filesystem is being * specified ala Sun. */ - if (vfslist == NULL && strpbrk(argv[0], ":@") != NULL) + if (vfslist == NULL && strpbrk(argv[0], ":@") != NULL && + access(argv[0], 0) == -1) vfstype = "nfs"; rval = mountfs(vfstype, argv[0], argv[1], init_flags, options, NULL);