Generalise the previous change so that only NFS hostnames are looked up.

PR:		bin/3588
Suggested by:	Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
This commit is contained in:
Doug Rabson 1997-05-16 10:27:02 +00:00
parent 740a435538
commit 43f67e2b2e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=25852

View File

@ -219,12 +219,12 @@ umountfs(name)
if (!selected(type))
return (0);
if ((delimp = strchr(name, '@')) != NULL && type != MOUNT_UNION) {
if ((delimp = strchr(name, '@')) != NULL && type == MOUNT_NFS) {
hostp = delimp + 1;
*delimp = '\0';
hp = gethostbyname(hostp);
*delimp = '@';
} else if ((delimp = strchr(name, ':')) != NULL && type != MOUNT_UNION) {
} else if ((delimp = strchr(name, ':')) != NULL && type == MOUNT_NFS) {
*delimp = '\0';
hostp = name;
hp = gethostbyname(hostp);