Changeset View
Changeset View
Standalone View
Standalone View
lib/libnv/nv.3
Show All 29 Lines | |||||
.\" | .\" | ||||
.Dd January 30, 2015 | .Dd January 30, 2015 | ||||
.Dt NV 3 | .Dt NV 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm nvlist_create , | .Nm nvlist_create , | ||||
.Nm nvlist_destroy , | .Nm nvlist_destroy , | ||||
.Nm nvlist_error , | .Nm nvlist_error , | ||||
.Nm nvlist_set_error , | |||||
.Nm nvlist_empty , | .Nm nvlist_empty , | ||||
.Nm nvlist_exists , | .Nm nvlist_exists , | ||||
.Nm nvlist_free , | .Nm nvlist_free , | ||||
.Nm nvlist_clone , | .Nm nvlist_clone , | ||||
.Nm nvlist_dump , | .Nm nvlist_dump , | ||||
.Nm nvlist_fdump , | .Nm nvlist_fdump , | ||||
.Nm nvlist_size , | .Nm nvlist_size , | ||||
.Nm nvlist_pack , | .Nm nvlist_pack , | ||||
Show All 12 Lines | |||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In nv.h | .In nv.h | ||||
.Ft "nvlist_t *" | .Ft "nvlist_t *" | ||||
.Fn nvlist_create "int flags" | .Fn nvlist_create "int flags" | ||||
.Ft void | .Ft void | ||||
.Fn nvlist_destroy "nvlist_t *nvl" | .Fn nvlist_destroy "nvlist_t *nvl" | ||||
.Ft int | .Ft int | ||||
.Fn nvlist_error "const nvlist_t *nvl" | .Fn nvlist_error "const nvlist_t *nvl" | ||||
.Ft void | |||||
.Fn nvlist_set_error "nvlist_t *nvl, int error" | |||||
.Ft bool | .Ft bool | ||||
.Fn nvlist_empty "const nvlist_t *nvl" | .Fn nvlist_empty "const nvlist_t *nvl" | ||||
.\" | .\" | ||||
.Ft "nvlist_t *" | .Ft "nvlist_t *" | ||||
.Fn nvlist_clone "const nvlist_t *nvl" | .Fn nvlist_clone "const nvlist_t *nvl" | ||||
.\" | .\" | ||||
.Ft void | .Ft void | ||||
.Fn nvlist_dump "const nvlist_t *nvl, int fd" | .Fn nvlist_dump "const nvlist_t *nvl, int fd" | ||||
▲ Show 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | |||||
function returns any error value that the nvlist accumulated. | function returns any error value that the nvlist accumulated. | ||||
If the given nvlist is | If the given nvlist is | ||||
.Dv NULL | .Dv NULL | ||||
the | the | ||||
.Er ENOMEM | .Er ENOMEM | ||||
error will be returned. | error will be returned. | ||||
.Pp | .Pp | ||||
The | The | ||||
.Fn nvlist_set_error | |||||
function sets an nvlist to be in the error state. | |||||
Subsequent calls to | |||||
.Fn nvlist_error | |||||
will return the given error value. | |||||
This function cannot be used to clear the error state from an nvlist. | |||||
This function does nothing if the nvlist is already in the error state. | |||||
.Pp | |||||
The | |||||
.Fn nvlist_empty | .Fn nvlist_empty | ||||
functions returns | function returns | ||||
.Dv true | .Dv true | ||||
if the given nvlist is empty and | if the given nvlist is empty and | ||||
.Dv false | .Dv false | ||||
otherwise. | otherwise. | ||||
The nvlist must not be in error state. | The nvlist must not be in error state. | ||||
.Pp | .Pp | ||||
The | The | ||||
.Fn nvlist_clone | .Fn nvlist_clone | ||||
▲ Show 20 Lines • Show All 372 Lines • Show Last 20 Lines |