mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-02 08:42:48 +00:00
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:
parent
740a435538
commit
43f67e2b2e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=25852
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user