mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Fix a typo relating to the "-U" (force UDP for mount protocol)
option. When specified, make sure to use the correct netid for the getnetconfigent() call, and also in error messages.
This commit is contained in:
parent
370d222b7f
commit
ba33efd92c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75401
@ -771,11 +771,12 @@ nfs_tryproto(struct nfs_args *nfsargsp, struct addrinfo *ai, char *hostp,
|
|||||||
}
|
}
|
||||||
/* The RPCPROG_MNT netid may be different. */
|
/* The RPCPROG_MNT netid may be different. */
|
||||||
if (mnttcp_ok) {
|
if (mnttcp_ok) {
|
||||||
|
netid_mnt = netid;
|
||||||
nconf_mnt = nconf;
|
nconf_mnt = nconf;
|
||||||
} else {
|
} else {
|
||||||
netid_mnt = (ai->ai_family == AF_INET6) ? "udp6" : "udp";
|
netid_mnt = (ai->ai_family == AF_INET6) ? "udp6" : "udp";
|
||||||
if ((nconf_mnt = getnetconfigent(netid)) == NULL) {
|
if ((nconf_mnt = getnetconfigent(netid_mnt)) == NULL) {
|
||||||
snprintf(errbuf, sizeof errbuf, "%s: %s", netid,
|
snprintf(errbuf, sizeof errbuf, "%s: %s", netid_mnt,
|
||||||
nc_sperror());
|
nc_sperror());
|
||||||
return (TRYRET_LOCALERR);
|
return (TRYRET_LOCALERR);
|
||||||
}
|
}
|
||||||
@ -846,7 +847,7 @@ nfs_tryproto(struct nfs_args *nfsargsp, struct addrinfo *ai, char *hostp,
|
|||||||
try.tv_usec = 0;
|
try.tv_usec = 0;
|
||||||
clp = clnt_tp_create(hostp, RPCPROG_MNT, mntvers, nconf_mnt);
|
clp = clnt_tp_create(hostp, RPCPROG_MNT, mntvers, nconf_mnt);
|
||||||
if (clp == NULL) {
|
if (clp == NULL) {
|
||||||
snprintf(errbuf, sizeof errbuf, "[%s] %s:%s: %s", netid,
|
snprintf(errbuf, sizeof errbuf, "[%s] %s:%s: %s", netid_mnt,
|
||||||
hostp, spec, clnt_spcreateerror("RPCMNT: clnt_create"));
|
hostp, spec, clnt_spcreateerror("RPCMNT: clnt_create"));
|
||||||
return (returncode(rpc_createerr.cf_stat,
|
return (returncode(rpc_createerr.cf_stat,
|
||||||
&rpc_createerr.cf_error));
|
&rpc_createerr.cf_error));
|
||||||
@ -867,7 +868,7 @@ nfs_tryproto(struct nfs_args *nfsargsp, struct addrinfo *ai, char *hostp,
|
|||||||
goto tryagain;
|
goto tryagain;
|
||||||
}
|
}
|
||||||
clnt_geterr(clp, &rpcerr);
|
clnt_geterr(clp, &rpcerr);
|
||||||
snprintf(errbuf, sizeof errbuf, "[%s] %s:%s: %s", netid,
|
snprintf(errbuf, sizeof errbuf, "[%s] %s:%s: %s", netid_mnt,
|
||||||
hostp, spec, clnt_sperror(clp, "RPCPROG_MNT"));
|
hostp, spec, clnt_sperror(clp, "RPCPROG_MNT"));
|
||||||
clnt_destroy(clp);
|
clnt_destroy(clp);
|
||||||
return (returncode(stat, &rpcerr));
|
return (returncode(stat, &rpcerr));
|
||||||
@ -875,7 +876,7 @@ nfs_tryproto(struct nfs_args *nfsargsp, struct addrinfo *ai, char *hostp,
|
|||||||
clnt_destroy(clp);
|
clnt_destroy(clp);
|
||||||
|
|
||||||
if (nfhret.stat != 0) {
|
if (nfhret.stat != 0) {
|
||||||
snprintf(errbuf, sizeof errbuf, "[%s] %s:%s: %s", netid,
|
snprintf(errbuf, sizeof errbuf, "[%s] %s:%s: %s", netid_mnt,
|
||||||
hostp, spec, strerror(nfhret.stat));
|
hostp, spec, strerror(nfhret.stat));
|
||||||
return (TRYRET_REMOTEERR);
|
return (TRYRET_REMOTEERR);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user