svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
kstat_named_init(9f)
kstat_named_init(9F) Kernel Functions kstat_named_init(9F)
NAME
kstat_named_init, kstat_named_setstr - initialize a named kstat
SYNOPSIS
#include <sys/types.h>
#include <sys/kstat.h>
void kstat_named_init(kstat_named_t *knp, const char *name,
uchar_t data_type);
void kstat_named_setstr(kstat_named_t *knp, const char *str);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)
PARAMETERS
knp Pointer to a kstat_named(9S) structure.
name The name of the statistic.
data_type The type of value. This indicates which field of the
kstat_named(9S) structure should be used. Valid values
are:
KSTAT_DATA_CHAR The "char" field.
KSTAT_DATA_LONG The "long" field.
KSTAT_DATA_ULONG The "unsigned long" field.
KSTAT_DATA_LONGLONG Obsolete. Use KSTAT_DATA_INT64.
KSTAT_DATA_ULONGLONG Obsolete. Use KSTAT_DATA_UINT64.
KSTAT_DATA_STRING Arbitrary length "long string"
field.
str Pointer to a NULL-terminated string.
DESCRIPTION
The kstat_named_init() function associates a name and a type with a
kstat_named(9S) structure.
The kstat_named_setstr() function associates str with the named kstat
knp. It is an error for knp to be of type other than KSTAT_DATA_STRING.
The string argument must remain valid even after the function that is
calling kstat_named_setstr() is returned. This is the only supported
method of changing the value of long strings.
RETURN VALUES
None.
CONTEXT
The kstat_named_init() and kstat_named_setstr() functions can be called
from user or kernel context.
SEE ALSO
kstat_create(9F), kstat_install(9F), kstat(9S), kstat_named(9S),
kstat2_create(9F), kstat2_install(9F), kstat2_nv_init(9F),
kstat2_named(9S), kstat_named_setstr(9F)
Writing Device Drivers in Oracle Solaris 11.4
NOTES
The kstat_named_init() and kstat_named_setstr() functions are depre‐
cated. These functions may be removed in a future release of Oracle
Solaris. Use the kstat2_create(), kstat2_nv_init() and kstat2_nv_set‐
str() functions instead. For more information, see the kstat2_cre‐
ate(9F), kstat2_nv_init(9F), and kstat2_nv_setstr(9F) man pages.
Oracle Solaris 11.4 19 Aug 2016 kstat_named_init(9F)