Let a file with '@' or ':' in it take precedence over defaulting to

nfs.
This commit is contained in:
Brian Feldman 1999-10-10 15:52:21 +00:00
parent 5ecac8709e
commit 2eb072e493
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52095
2 changed files with 8 additions and 4 deletions

View File

@ -258,10 +258,12 @@ main(argc, argv)
case 2: case 2:
/* /*
* If -t flag has not been specified, and spec contains either * 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. * specified ala Sun.
*/ */
if (vfslist == NULL && strpbrk(argv[0], ":@") != NULL) if (vfslist == NULL && strpbrk(argv[0], ":@") != NULL &&
access(argv[0], 0) == -1)
vfstype = "nfs"; vfstype = "nfs";
rval = mountfs(vfstype, rval = mountfs(vfstype,
argv[0], argv[1], init_flags, options, NULL); argv[0], argv[1], init_flags, options, NULL);

View File

@ -258,10 +258,12 @@ main(argc, argv)
case 2: case 2:
/* /*
* If -t flag has not been specified, and spec contains either * 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. * specified ala Sun.
*/ */
if (vfslist == NULL && strpbrk(argv[0], ":@") != NULL) if (vfslist == NULL && strpbrk(argv[0], ":@") != NULL &&
access(argv[0], 0) == -1)
vfstype = "nfs"; vfstype = "nfs";
rval = mountfs(vfstype, rval = mountfs(vfstype,
argv[0], argv[1], init_flags, options, NULL); argv[0], argv[1], init_flags, options, NULL);