1nvpair_value_byte(3NVPAINRa)me-value Pair Library Functinovnpsair_value_byte(3NVPAIR)
2
3
4
6 nvpair_value_byte, nvpair_value_boolean_value, nvpair_value_int8,
7 nvpair_value_uint8, nvpair_value_int16, nvpair_value_uint16,
8 nvpair_value_int32, nvpair_value_uint32, nvpair_value_int64,
9 nvpair_value_uint64, nvpair_value_double, nvpair_value_string,
10 nvpair_value_nvlist, nvpair_value_boolean_array,
11 nvpair_value_byte_array, nvpair_value_int8_array,
12 nvpair_value_uint8_array, nvpair_value_int16_array,
13 nvpair_value_uint16_array, nvpair_value_int32_array,
14 nvpair_value_uint32_array, nvpair_value_int64_array,
15 nvpair_value_uint64_array, nvpair_value_string_array,
16 nvpair_value_nvlist_array - retrieve value from a name-value pair
17
19 cc [ flag... ] file... -lnvpair [ library... ]
20 #include <libnvpair.h>
21
22 int nvpair_value_byte(nvpair_t *nvpair, uchar_t *val);
23
24
25 int nvpair_value_boolean_value(nvpair_t *nvpair,
26 boolean_t *val);
27
28
29 int nvpair_value_int8(nvpair_t *nvpair, int8_t *val);
30
31
32 int nvpair_value_uint8(nvpair_t *nvpair, uint8_t *val);
33
34
35 int nvpair_value_int16(nvpair_t *nvpair, int16_t *val);
36
37
38 int nvpair_value_uint16(nvpair_t *nvpair, uint16_t *val);
39
40
41 int nvpair_value_int32(nvpair_t *nvpair, int32_t *val);
42
43
44 int nvpair_value_uint32(nvpair_t *nvpair, uint32_t *val);
45
46
47 int nvpair_value_int64(nvpair_t *nvpair, int64_t *val);
48
49
50 int nvpair_value_uint64(nvpair_t *nvpair, uint64_t *val);
51
52
53 int nvpair_value_double(nvpair_t *nvpair, double *val);
54
55
56 int nvpair_value_string(nvpair_t *nvpair, char **val);
57
58
59 int nvpair_value_nvlist(nvpair_t *nvpair, nvlist_t **val);
60
61
62 int nvpair_value_boolean_array(nvpair_t *nvpair,
63 boolean_t **val, uint_t *nelem);
64
65
66 int nvpair_value_byte_array(nvpair_t *nvpair, uchar_t **val,
67 uint_t *nelem);
68
69
70 int nvpair_value_int8_array(nvpair_t *nvpair, int8_t **val,
71 uint_t *nelem);
72
73
74 int nvpair_value_uint8_array(nvpair_t *nvpair, uint8_t **val,
75 uint_t *nelem);
76
77
78 int nvpair_value_int16_array(nvpair_t *nvpair, int16_t **val,
79 uint_t *nelem);
80
81
82 int nvpair_value_uint16_array(nvpair_t *nvpair,
83 uint16_t **val, uint_t *nelem);
84
85
86 int nvpair_value_int32_array(nvpair_t *nvpair,
87 int32_t **val, uint_t *nelem);
88
89
90 int nvpair_value_uint32_array(nvpair_t *nvpair,
91 uint32_t **val, uint_t *nelem);
92
93
94 int nvpair_value_int64_array(nvpair_t *nvpair,
95 int64_t **val, uint_t *nelem);
96
97
98 int nvpair_value_uint64_array(nvpair_t *nvpair,
99 uint64_t **val, uint_t *nelem);
100
101
102 int nvpair_value_string_array(nvpair_t *nvpair,
103 char ***val, uint_t *nelem);
104
105
106 int nvpair_value_nvlist_array(nvpair_t *nvpair,
107 nvlist_t ***val, uint_t *nelem);
108
109
111 nvpair Name-value pair to be processed.
112
113
114 nelem Address to store the number of elements in value.
115
116
117 val Address to store the value or the starting address of the
118 array value.
119
120
122 These functions retrieve the value of nvpair. The data type of nvpair
123 must match the interface name for the call to be successful.
124
125
126 There is no nvpair_value_boolean(); the existence of the name implies
127 the value is true.
128
129
130 For array data types, including string, the memory containing the data
131 is managed by the library and references to the value remains valid
132 until nvlist_free() is called on the nvlist_t from which nvpair is
133 obtained. See nvlist_free(3NVPAIR).
134
135
136 The value of an nvpair may not be retrieved after the nvpair has been
137 removed from or replaced in an nvlist. Replacement can occur during
138 pair additions to nvlists created with NV_UNIQUE_NAME_TYPE and
139 NV_UNIQUE_NAME. See nvlist_alloc(3NVPAIR).
140
142 These functions return 0 on success and an error value on failure.
143
145 These functions will fail if:
146
147 EINVAL Either one of the arguments is NULL or the type of nvpair
148 does not match the function name.
149
150
152 See attributes(5) for descriptions of the following attributes:
153
154
155
156
157 ┌────────────────────────────┬──────────────────────────────┐
158 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
159 ├────────────────────────────┼──────────────────────────────┤
160 │Interface Stability │ Committed │
161 ├────────────────────────────┼──────────────────────────────┤
162 │MT-Level │ MT-Safe │
163 └────────────────────────────┴──────────────────────────────┘
164
166 libnvpair(3LIB), nvlist_alloc(3NVPAIR), attributes(5)
167
168
169
170SunOS 5.11 1 Aug 2008 nvpair_value_byte(3NVPAIR)