|
Kernel Functions for Drivers | nvlist_lookup_boolean(9F) |
| nvlist_lookup_boolean, nvlist_lookup_byte, nvlist_lookup_int16, nvlist_lookup_uint16, nvlist_lookup_int32, nvlist_lookup_uint32, nvlist_lookup_int64, nvlist_lookup_uint64, nvlist_lookup_string, nvlist_lookup_byte_array, nvlist_lookup_int16_array, nvlist_lookup_uint16_array, nvlist_lookup_int32_array, nvlist_lookup_uint32_array, nvlist_lookup_int64_array, nvlist_lookup_uint64_array, nvlist_lookup_string_array - match name and type indicated by the interface name and retrieve
data value |
SYNOPSIS
|
#include <sys/nvpair.h> int nvlist_lookup_boolean(nvlist_t *nvl, char *name); |
| int nvlist_lookup_byte(nvlist_t *nvl, char *name, uchar_t *val); |
| int nvlist_lookup_int16(nvlist_t *nvl, char *name, int16_t *val); |
| int nvlist_lookup_uint16(nvlist_t *nvl, char *name, uint16_t *val); |
| int nvlist_lookup_int32(nvlist_t *nvl, char *name, int32_t *val); |
| int nvlist_lookup_uint32(nvlist_t *nvl, char *name, uint32_t *val); |
| int nvlist_lookup_int64(nvlist_t *nvl, char *name, int64_t *val); |
| int nvlist_lookup_uint64(nvlist_t *nvl, char *name, uint64_t *val); |
| int nvlist_lookup_string(nvlist_t *nvl, char *name, char **val); |
| int nvlist_lookup_byte_array(nvlist_t *nvl, char *name, uchar_t **val, uint_t *nelem); |
| int nvlist_lookup_int16_array(nvlist_t *nvl, char *name, int16_t **val, uint_t *nelem); |
| int nvlist_lookup_uint16_array(nvlist_t *nvl, char *name, uint16_t **val, uint_t *nelem); |
| int nvlist_lookup_int32_array(nvlist_t *nvl, char *name, int32_t **val, uint_t *nelem); |
| int nvlist_lookup_uint32_array(nvlist_t *nvl, char *name, uint32_t **val, uint_t *nelem); |
| int nvlist_lookup_int64_array(nvlist_t *nvl, char *name, int64_t **val, uint_t *nelem); |
| int nvlist_lookup_uint64_array(nvlist_t *nvl, char *name, uint64_t **val, uint_t *nelem); |
| int nvlist_lookup_string_array(nvlist_t *nvl, char *name, char ***val, uint_t *nelem); |
|
Solaris DDI specific (Solaris DDI)
|
|
-
nvl
- The list of name-value pairs (nvlist_t) to be processed.
-
name
- Name of the name-value pair (nvpair) to search.
-
nelem
- Address to store the number of elements in value.
-
val
- Address to store the value or starting address of the array value.
|
|
These functions find the nvpair that matches the name and type as indicated by the interface name. If one is found, nelem and val are modified to contain the number of elements in value and the starting address of data, respectively.
These interfaces work for nvlist_ts allocated with NV_UNIQUE_NAME or NV_UNIQUE_NAME_TYPE specified in nvlist_alloc(). (See nvlist_alloc(9F).) If this is not the case, the interface will return ENOTSUP because the list potentially contains multiple nvpairs with the same name and type.
All memory required for storing the array elements, including string values, are managed by the library. References to such data remain valid until nvlist_free() is called on nvl.
|
|
-
0
- success
-
EINVAL
- invalid argument
-
ENOENT
- no matching name-value pair found
-
ENOTSUP
- encode/decode method not supported
|
|
These functions can be called from user or interrupt contexts.
|
SunOS 5.9 | Go To Top | Last Changed 26 September 2000 |
| |