From f9f60207318d6373f0da852a06b1463e95641fec Mon Sep 17 00:00:00 2001 From: alfred Date: Thu, 11 Apr 2002 07:19:30 +0000 Subject: 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(-) (limited to 'usr.sbin') diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c index a31f6a0..2f56aba 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) { -- cgit v1.1