diff options
author | green <green@FreeBSD.org> | 1999-10-10 15:52:21 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 1999-10-10 15:52:21 +0000 |
commit | 6534a2c9acfd1f4425bb81018f348a1ccdc5c577 (patch) | |
tree | 5b82bd53e5b24322cf995c60a24570c3d1fea4b5 /sbin | |
parent | 8912aa90303eef751dc447872ee65c1d65eacc58 (diff) | |
download | FreeBSD-src-6534a2c9acfd1f4425bb81018f348a1ccdc5c577.zip FreeBSD-src-6534a2c9acfd1f4425bb81018f348a1ccdc5c577.tar.gz |
Let a file with '@' or ':' in it take precedence over defaulting to
nfs.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/mount/mount.c | 6 | ||||
-rw-r--r-- | 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 b84696a..d302522 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 b84696a..d302522 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); |