Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/yp Remove useless macros. Sort errors.
details: https://anonhg.NetBSD.org/src/rev/ec9d0d686254
branches: trunk
changeset: 359461:ec9d0d686254
user: wiz <wiz%NetBSD.org@localhost>
date: Sun Feb 11 13:30:55 2018 +0000
description:
Remove useless macros. Sort errors.
diffstat:
lib/libc/yp/ypclnt.3 | 105 ++++++++++++++------------------------------------
1 files changed, 29 insertions(+), 76 deletions(-)
diffs (219 lines):
diff -r 8b62776d9693 -r ec9d0d686254 lib/libc/yp/ypclnt.3
--- a/lib/libc/yp/ypclnt.3 Sun Feb 11 13:28:49 2018 +0000
+++ b/lib/libc/yp/ypclnt.3 Sun Feb 11 13:30:55 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ypclnt.3,v 1.29 2018/02/07 11:16:06 pgoyette Exp $
+.\" $NetBSD: ypclnt.3,v 1.30 2018/02/11 13:30:55 wiz Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -78,12 +78,8 @@
.Sh DESCRIPTION
The
.Nm ypclnt
-suite provides an interface to the
-.Tn YP
-subsystem.
-For a general description of the
-.Tn YP
-subsystem, see
+suite provides an interface to the YP subsystem.
+For a general description of the YP subsystem, see
.Xr yp 8 .
.Pp
For all functions, input values begin with
@@ -99,14 +95,10 @@
.Er YPERR_BADARGS
will be returned).
If necessary,
-memory will be allocated by the
-.Tn YP
-client routines using
+memory will be allocated by the YP client routines using
.Fn malloc ,
and the result will be stored in the appropriate output value.
-If the invocation of a
-.Tn YP
-client routine doesn't return an error,
+If the invocation of a YP client routine doesn't return an error,
and an output value is not the null pointer, then this memory
should be freed by the user when there is no additional need for
the data stored there.
@@ -134,45 +126,30 @@
corresponding length value is zero.
Such strings need not be NUL-terminated.
.Pp
-All
-.Tn YP
-lookup calls (the functions
+All YP lookup calls (the functions
.Fn yp_all ,
.Fn yp_first ,
.Fn yp_master ,
.Fn yp_match ,
.Fn yp_next ,
.Fn yp_order )
-require a
-.Tn YP
-domain name and a
-.Tn YP
-map name.
+require a YP domain name and a YP map name.
The default domain name may be obtained by calling
.Fn yp_get_default_domain ,
-and should thus be used before all other
-.Tn YP
-calls in a client program.
+and should thus be used before all other YP calls in a client program.
The value it places
.Pa outdomain
is suitable for use as the
.Pa indomain
-parameter to all subsequent
-.Tn YP
-calls.
+parameter to all subsequent YP calls.
.Pp
-In order for
-.Tn YP
-lookup calls to succeed, the client process must be bound
-to a
-.Tn YP
-server process.
+In order for YP lookup calls to succeed, the client process must be bound
+to a YP server process.
The client process need not explicitly bind to
the server, as it happens automatically whenever a lookup occurs.
The function
.Fn yp_bind
-is provided for a backup strategy, e.g. a local file, when a
-.Tn YP
+is provided for a backup strategy, e.g. a local file, when a YP
server process is not available.
Each binding uses one socket descriptor on the client
process, which may be explicitly freed using
@@ -180,20 +157,14 @@
which frees all per-process and per-node resources to bind the domain and
marks the domain unbound.
.Pp
-If, during a
-.Tn YP
-lookup, an RPC failure occurs, the domain used in the lookup
+If, during a YP lookup, an RPC failure occurs, the domain used in the lookup
is automatically marked unbound and the
.Nm ypclnt
layer retries the lookup as long as
.Xr ypbind 8
is running and either the client process cannot bind to a server for the domain
-specified in the lookup, or RPC requests to the
-.Tn YP
-server process fail.
-If an error is not RPC-related, one of the
-.Tn YP
-error codes described below
+specified in the lookup, or RPC requests to the YP server process fail.
+If an error is not RPC-related, one of the YP error codes described below
is returned and control given back to the user code.
.Pp
The
@@ -225,9 +196,7 @@
and
.Dq next
are particular to the
-type of
-.Tn YP
-map being accessed, and thus there is no guarantee of lexical order.
+type of YP map being accessed, and thus there is no guarantee of lexical order.
The only guarantees provided with
.Fn yp_first
and
@@ -295,13 +264,11 @@
.In rpcsvc/yp_prot.h :
see
.Fn ypprot_err
-below for a function that will translate
-.Tn YP
-protocol errors into a
+below for a function that will translate YP protocol errors into a
.Nm ypclnt
layer error code as described in
.In rpcsvc/ypclnt.h .
-.It Fa inkey, inval
+.It Fa inkey , inval
The key and value arguments are somewhat different here than described
above.
In this case, the memory pointed to by
@@ -334,9 +301,7 @@
.It Fn yp_order
Returns the order number for a map.
.It Fn yp_master
-Returns the hostname for the machine on which the master
-.Tn YP
-server process for
+Returns the hostname for the machine on which the master YP server process for
a map is running.
.It Fn yperr_string
Returns a pointer to a NUL-terminated error string that does not contain a
@@ -344,9 +309,7 @@
or
.Ql \en .
.It Fn ypprot_err
-Converts a
-.Tn YP
-protocol error code to a
+Converts a YP protocol error code to a
.Nm ypclnt
error code suitable for
.Fn yperr_string .
@@ -372,21 +335,18 @@
.It Bq Er YPERR_BADARGS
The passed arguments to the function are invalid.
.It Bq Er YPERR_BADDB
-The
-.Tn YP
-map that was polled is defective.
+The YP map that was polled is defective.
+.It Bq Er YPERR_BIND
+Cannot communicate with
+.Xr ypbind 8 .
+.It Bq Er YPERR_DOM
+The local YP domain is not set.
.It Bq Er YPERR_DOMAIN
-Client process cannot bind to server on this
-.Tn YP
-domain.
+Client process cannot bind to server on this YP domain.
.It Bq Er YPERR_KEY
The key passed does not exist.
.It Bq Er YPERR_MAP
There is no such map in the server's domain.
-.It Bq Er YPERR_DOM
-The local
-.Tn YP
-domain is not set.
.It Bq Er YPERR_NOMORE
There are no more records in the queried map.
.It Bq Er YPERR_PMAP
@@ -399,20 +359,13 @@
The domain has been marked unbound.
.It Bq Er YPERR_VERS
Client/server version mismatch.
-If the server is running version 1 of the
-.Tn YP
-protocol,
+If the server is running version 1 of the YP protocol,
.Fn yp_all
functionality does not exist.
-.It Bq Er YPERR_BIND
-Cannot communicate with
-.Xr ypbind 8 .
.It Bq Er YPERR_YPERR
An internal server or client error has occurred.
.It Bq Er YPERR_YPSERV
-The client cannot communicate with the
-.Tn YP
-server process.
+The client cannot communicate with the YP server process.
.El
.Sh SEE ALSO
.Xr malloc 3 ,
Home |
Main Index |
Thread Index |
Old Index