kstat2_nv_setstr, kstat2_nv_setstrs, kstat2_nv_setints - set a string or array kstat value
#include <sys/types.h> #include <sys/kstat2.h> void kstat2_nv_setstr(kstat2_named_t *knp, char *str) void kstat2_nv_setstrs(kstat2_named_t *knp, kstat2_named_str_t *arr, uint32_t len); void kstat2_nv_setints(kstat2_named_t *knp, uint64_t *arr, uint32_t len);
Solaris DDI specific (Solaris DDI)
Pointer to storage for a kstat2 name-value pair.
kstat2_nv_setstr()
Null-terminated character string which is the value for this name-value pair. NULL and empty string are acceptable values. A string can be up to 2^16-1 characters in length, including the NULL.
kstat2_nv_setstrs() and kstat2_nv_setints()
Array of kstat2_named_str_t or uint64_t which is the value for this name-value pair.
Number of strings or integers in the array. Arrays can have up to 2^32-1 elements.
The kstat2_nv_setstr() function is used to set a string value on a given kstat name-value pair structure.
The kstat2_nv_setstrs() function is used to set a string array on a given kstat name-value pair structure. If the supplied value for arr is NULL, the internal array length is set to zero.
The kstat2_nv_setints() function is used to set an integer array on a given kstat name-value pair structure. If the supplied value for arr is NULL, the internal array length is set to zero.
None
These functions can be called from any context.
kstat2_nv_init(9F), kstat2(9S), kstat2_named(9S)
Before calling the functions, the kstat2_named(9S) structure should have its type set appropriately to one of the following: KSTAT2_NVVT_STR, KSTAT2_NVVT_STRS, KSTAT2_NVVT_INTS.