diff options
Diffstat (limited to 'share/man/man9/dnv.9')
-rw-r--r-- | share/man/man9/dnv.9 | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/share/man/man9/dnv.9 b/share/man/man9/dnv.9 index 8c89d6599801..16f603df8392 100644 --- a/share/man/man9/dnv.9 +++ b/share/man/man9/dnv.9 @@ -23,13 +23,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 26, 2016 +.Dd January 3, 2025 .Dt DNV 9 .Os .Sh NAME .Nm dnvlist_get , .Nm dnvlist_take -.Nd "API for getting name/value pairs. Nonexistent pairs do not raise an error." +.Nd "API for getting name/value pairs with a default value" .Sh LIBRARY .Lb libnv .Sh SYNOPSIS @@ -63,26 +63,32 @@ The .Nm libnv library permits easy management of name/value pairs and can send and receive them over sockets. -For more information, also see +For more information, see .Xr nv 9 . .Pp The .Nm dnvlist_get -family of functions returns the value associated with the specified name. -If an element of the specified name does not exist, the function returns the +functions return the value associated with +.Fa name . +If an element named +.Fa name +does not exist, the function returns the value provided in .Fa defval . Returned strings, nvlists, descriptors, binaries, or arrays must not be modified -by the user. -They still belong to the nvlist. +by the user since they still belong to the nvlist. If the nvlist is in an error state, attempts to use any of these functions will cause the program to abort. .Pp The .Nm dnvlist_take -family of functions returns the value associated with the specified name and -removes the element from the nvlist. -If an element of the supplied name does not exist, the value provided in +functions return the value associated with +.Fa name +and removes the associated element from +.Fa nvl . +If an element named +.Fa name +does not exist, the value provided in .Nm defval is returned. When the value is a string, binary, or array value, the caller is |