svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
kstat2_nv_init(9f)
kstat2_nv_init(9F) Kernel Functions kstat2_nv_init(9F)
NAME
kstat2_nv_init - initialize a kstat2 name-value pair
SYNOPSIS
#include <sys/types.h>
#include <sys/kstat2.h>
void kstat2_nv_init(kstat2_named_t *knp,
const char *name, uchar_t type, uint16_t flags)
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)
PARAMETERS
knp Pointer to storage for a kstat2 name-value pair.
name Null-terminated character string which is the name of an nv
pair. Must not be NULL or an empty string.
type Type of the data in the nv pair (see DESCRIPTION)
flags Initial flags to be set on the name-value pair.
DESCRIPTION
kstat2_nv_init() function is used to initialize a single kstats v2
name-value pair structure.
The kstat2_named(9S) structure is initialized from the values passed in
as parameters and the value field appropriate to the type is cleared.
name Should point to a static null-terminated string which cannot be
NULL or zero length. The length of a name is limited to 2^16-1
characters. In practice, the more concise the name, the better.
type It defines one of the values from the enumerated type:
typedef struct kstat2_nv_type {
KSTAT2_NVVT_INT /* 64-bit unsigned integer */
KSTAT2_NVVT_INTS /* Array of 64-bit unsigned
integers */
KSTAT2_NVVT_STR /* Null-terminated C string */
KSTAT2_NVVT_STRS /* Array of null-terminated C
strings */
} kstat2_nv_type_t;
flag It defines one of the values from the enumerated type:
typedef enum kstat2_nv_flag {
KSTAT2_NVF_NONE /* No flags present */
KSTAT2_NVF_INVAL /* Value is invalid */
} kstat2_nv_flag_t;
typically this will be KSTAT2_NVF_NONE as KSTAT2_NVF_INVAL is
used to indicate that the value in the nv pair is invalid. If
KSTAT2_NVF_INVAL is used, then it should be cleared once a
valid value is set in the nv pair so that clients know that the
data is valid.
RETURN VALUES
None
CONTEXT
The kstat2_nv_init() function can be called from user or kernel con‐
text.
SEE ALSO
kstat2_create(9F), kstat2_create_with_template(9F), kstat2_nv_set‐
ints(9F), kstat2_nv_setstr(9F), kstat2_nv_setstrs(9F), kstat2(9S),
kstat2_named(9S)
Oracle Solaris 11.4 16 Jul 2015 kstat2_nv_init(9F)