From 1093ff61cdfeb9fdb9d8469ee082db0b16cf758e Mon Sep 17 00:00:00 2001 From: Mariusz Zaborski Date: Mon, 18 Jun 2018 23:00:15 +0000 Subject: [PATCH] libnv: add note about nvlist_pack and nvlist_unpack Fix small typo as well. Submitted by: Mindaugas Rasiukevicius --- share/man/man9/nv.9 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/share/man/man9/nv.9 b/share/man/man9/nv.9 index 66aa7dd8c553..c80e70116d67 100644 --- a/share/man/man9/nv.9 +++ b/share/man/man9/nv.9 @@ -589,7 +589,7 @@ The .Fn nvlist_add_nvlist_array , .Fn nvlist_add_descriptor_array functions add element to the given nvlist. -When adding string or binary buffor the functions will allocate memory +When adding string or binary buffer the functions will allocate memory and copy the data over. When adding nvlist, the nvlist will be cloned and clone will be added. When adding descriptor, the descriptor will be duplicated using the @@ -768,6 +768,13 @@ function name from the nvlist and free all resources associated with it. If element of the given name and the given type does not exist, the program will be aborted. The nvlist must not be in error state. +.Sh NOTES +The +.Fn nvlist_pack +and +.Fn nvlist_unpack +functions handle the byte-order conversions, so the binary buffer can be +packed/unpacked by the hosts with the different endianness. .Sh EXAMPLES The following example demonstrates how to prepare an nvlist and send it over .Xr unix 4