Parameters

Description

These functions retrieve the value of nvpair. The data type of nvpair must match the function name for the call to be successful.

There is no nvpair_value_boolean(); the existence of the name implies the value is true.

For array data types, including string, the memory containing the data is managed by the library and references to the value remains valid until nvlist_free() is called on the nvlist_t from which nvpair is obtained. See nvlist_free(9F)

The value of an nvpair may not be retrieved after the nvpair having been removed from or replaced in an nvlist. Replacement can happen during pair addition on nvlists created with NV_UNIQUE_NAME_TYPE and NV_UNIQUE_NAME. See nvlist_alloc(9F) for more details.

Return Values

0

Success

EINVAL

Either one of the arguments is NULL or type of nvpair does not match the interface name.

Context

These functions can be called from user, interrupt, or kernel context.