Print this page
12743 man page spelling mistakes
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3pool/pool_get_property.3pool.man.txt
+++ new/usr/src/man/man3pool/pool_get_property.3pool.man.txt
1 1 POOL_GET_PROPERTY(3POOL) Pool Configuration Manipulation Library Functions
2 2
3 3
4 4
5 5 NAME
6 6 pool_get_property, pool_put_property, pool_rm_property,
7 7 pool_walk_properties - resource pool element property manipulation
8 8
9 9 SYNOPSIS
10 10 cc [ flag... ] file... -lpool [ library... ]
11 11 #include <pool.h>
12 12
13 13 pool_value_class_t pool_get_property(pool_conf_t *conf,
14 14 const pool_elem_t *elem, const char *name,
15 15 pool_value_t *property);
16 16
17 17
18 18 int pool_put_property(pool_conf_t *conf, pool_elem_t *elem,
19 19 const char *name, const pool_value_t *value);
20 20
21 21
22 22 int pool_rm_property(pool_conf_t *conf, pool_elem_t *elem,
23 23 const char *name);
24 24
25 25
26 26 int pool_walk_properties(pool_conf_t *conf, pool_elem_t *elem,
27 27 void *arg, int (*callback)(pool_conf_t *, pool_elem_t *,
28 28 const char *, pool_value_t *, void *));
29 29
30 30
31 31 DESCRIPTION
32 32 The various pool types are converted to the common pool element type
33 33 (pool_elem_t) before property manipulation. A pool_value_t is an opaque
34 34 type that contains a property value of one of the following types:
35 35
36 36 POC_UINT
37 37 unsigned 64-bit integer
38 38
39 39
40 40 POC_INT
41 41 signed 64-bit integer
42 42
43 43
44 44 POC_DOUBLE
45 45 signed double-precision floating point value
46 46
47 47
48 48 POC_BOOL
49 49 boolean value: 0 is false, non-zero is true
50 50
51 51
52 52 POC_STRING
53 53 null-terminated string of characters
54 54
55 55
56 56
57 57 The conf argument for each function refers to the target configuration
58 58 to which the operation applies.
59 59
60 60
61 61 The pool_get_property() function attempts to retrieve the value of the
62 62 named property from the element. If the property is not found or an
63 63 error occurs, the value POC_INVAL is returned to indicate error.
64 64 Otherwise the type of the value retrieved is returned.
65 65
66 66
↓ open down ↓ |
66 lines elided |
↑ open up ↑ |
67 67 The pool_put_property() function attempts to set the named property on
68 68 the element to the specified value. Attempting to set a property that
69 69 does not currently exist on the element will cause the property with
70 70 the given name and value to be created on the element and will not
71 71 cause an error. An attempt to overwrite an existing property with a new
72 72 property of a different type is an error.
73 73
74 74
75 75 The pool_rm_property() function attempts to remove the named property
76 76 from the element. If the property does not exist or is not removable,
77 - -1 is returned and pool_error(3POOL) reporst an error of POE_PUTPROP.
77 + -1 is returned and pool_error(3POOL) reports an error of POE_PUTPROP.
78 78
79 79
80 80 The pool_walk_properties() function invokes callback on all properties
81 81 defined for the given element. The callback is called with the element
82 82 itself, the name of the property, the value of the property, and the
83 83 caller-provided opaque argument.
84 84
85 85
86 86 A number of special properties are reserved for internal use and cannot
87 87 be set or removed. Attempting to do so will fail. These properties are
88 88 documented on the libpool(3LIB) manual page.
89 89
90 90 RETURN VALUES
91 91 Upon successful completion, pool_get_property() returns the type of the
92 92 property. Otherwise it returns POC_INVAL and pool_error() returns the
93 93 pool-specific error value.
94 94
95 95
96 96 Upon successful completion, pool_put_property(), pool_rm_property(),
97 97 and pool_walk_properties() return 0. Otherwise they return -1 and
98 98 pool_error() returns the pool-specific error value.
99 99
100 100 ERRORS
101 101 The pool_get_property() function will fail if:
102 102
103 103 POE_BADPARAM
104 104 The supplied configuration's status is not POF_VALID,
105 105 the supplied conf does not contain the supplied elem,
106 106 or the property is restricted and cannot be accessed by
107 107 the library.
108 108
109 109
110 110 POE_SYSTEM
111 111 A system error has occurred. Check the system error
112 112 code for more details.
113 113
114 114
115 115
116 116 The pool_put_property() function will fail if:
117 117
118 118 POE_BADPARAM
119 119 The supplied configuration's status is not
120 120 POF_VALID, the supplied conf does not contain the
121 121 supplied elem, the property name is not in the
122 122 correct format, or the property already exists and
123 123 the supplied type does not match the existing type.
124 124
125 125
126 126 POE_SYSTEM
127 127 A system error has occurred. Check the system error
128 128 code for more details.
129 129
130 130
131 131 POE_PUTPROP
132 132 The property name is reserved by libpool and not
133 133 available for use.
134 134
135 135
136 136 POE_INVALID_CONF
137 137 The configuration is invalid.
138 138
139 139
140 140
141 141 The pool_rm_property() function will fail if:
142 142
143 143 POE_BADPARAM
144 144 The supplied configuration's status is not POF_VALID,
145 145 the supplied conf does not contain the supplied elem,
146 146 or the property is reserved by libpool and cannot be
147 147 removed.
148 148
149 149
150 150 POE_SYSTEM
151 151 A system error has occurred. Check the system error
152 152 code for more details.
153 153
154 154
155 155 POE_PUTPROP
156 156 The property name is reserved by libpool and not
157 157 available for use.
158 158
159 159
160 160
161 161 The pool_walk_properties() function will fail if:
162 162
163 163 POE_BADPARAM
164 164 The supplied configuration's status is not POF_VALID.
165 165
166 166
167 167 POE_SYSTEM
168 168 A system error has occurred. Check the system error
169 169 code for more details.
170 170
171 171
172 172 ATTRIBUTES
173 173 See attributes(5) for descriptions of the following attributes:
174 174
175 175
176 176
177 177
178 178 +--------------------+-----------------+
179 179 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
180 180 +--------------------+-----------------+
181 181 |CSI | Enabled |
182 182 +--------------------+-----------------+
↓ open down ↓ |
95 lines elided |
↑ open up ↑ |
183 183 |Interface Stability | Unstable |
184 184 +--------------------+-----------------+
185 185 |MT-Level | Safe |
186 186 +--------------------+-----------------+
187 187
188 188 SEE ALSO
189 189 libpool(3LIB), pool_error(3POOL), attributes(5)
190 190
191 191
192 192
193 - September 23, 2003 POOL_GET_PROPERTY(3POOL)
193 + May 16, 2020 POOL_GET_PROPERTY(3POOL)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX