aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2002-04-11 07:19:30 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2002-04-11 07:19:30 +0000
commit5ed43a1e8e6026bc26ac4effd716e2375053ac78 (patch)
tree9e2d20f2512263de519faac2a39ea4d66a2d62f8 /usr.sbin
parent17dfcdfaed860ea7042e1265e8c82cc415ba1039 (diff)
downloadsrc-5ed43a1e8e6026bc26ac4effd716e2375053ac78.tar.gz
src-5ed43a1e8e6026bc26ac4effd716e2375053ac78.zip
When binding to transports if getnetconfigent() fails then actually
print out the correct transport it failed on rather than always spitting out 'udp', also call nc_sperror() to give a more verbose error message detailing the problem.
Notes
Notes: svn path=/head/; revision=94404
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rpc.lockd/lockd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c
index a31f6a0d5704..2f56aba5b51a 100644
--- a/usr.sbin/rpc.lockd/lockd.c
+++ b/usr.sbin/rpc.lockd/lockd.c
@@ -142,7 +142,8 @@ main(argc, argv)
for (i = 0; i < maxindex; i++) {
nconf = getnetconfigent(transports[i]);
if (nconf == NULL)
- errx(1, "cannot get udp netconf.");
+ errx(1, "cannot get %s netconf: %s.", transports[i],
+ nc_sperror());
transp = svc_tli_create(RPC_ANYFD, nconf, NULL, 0, 0);
if (transp == NULL) {