mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 17:52:43 +00:00
Cleanup use of 'host' when running 'rpcinfo -p'.
Obtained from: NetBSD
This commit is contained in:
parent
5bb295c408
commit
b918e60351
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239373
@ -476,7 +476,7 @@ pmapdump(int argc, char **argv)
|
||||
struct rpcent *rpc;
|
||||
enum clnt_stat clnt_st;
|
||||
struct rpc_err err;
|
||||
char *host;
|
||||
char *host = NULL;
|
||||
|
||||
if (argc > 1)
|
||||
usage();
|
||||
@ -513,10 +513,16 @@ pmapdump(int argc, char **argv)
|
||||
if ((clnt_st == RPC_PROGVERSMISMATCH) ||
|
||||
(clnt_st == RPC_PROGUNAVAIL)) {
|
||||
CLNT_GETERR(client, &err);
|
||||
if (err.re_vers.low > PMAPVERS)
|
||||
warnx(
|
||||
"%s does not support portmapper. Try rpcinfo %s instead",
|
||||
host, host);
|
||||
if (err.re_vers.low > PMAPVERS) {
|
||||
if (host)
|
||||
warnx("%s does not support portmapper."
|
||||
"Try rpcinfo %s instead", host,
|
||||
host);
|
||||
else
|
||||
warnx("local host does not support "
|
||||
"portmapper. Try 'rpcinfo' "
|
||||
"instead");
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
clnt_perror(client, "rpcinfo: can't contact portmapper");
|
||||
|
Loading…
Reference in New Issue
Block a user