From 5ed43a1e8e6026bc26ac4effd716e2375053ac78 Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Thu, 11 Apr 2002 07:19:30 +0000 Subject: [PATCH] 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. --- usr.sbin/rpc.lockd/lockd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {