Print this page
12743 man page spelling mistakes
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3pool/pool_get_property.3pool
+++ new/usr/src/man/man3pool/pool_get_property.3pool
1 1 '\" te
2 2 .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
3 3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 -.TH POOL_GET_PROPERTY 3POOL "Sep 23, 2003"
6 +.TH POOL_GET_PROPERTY 3POOL "May 16, 2020"
7 7 .SH NAME
8 8 pool_get_property, pool_put_property, pool_rm_property, pool_walk_properties \-
9 9 resource pool element property manipulation
10 10 .SH SYNOPSIS
11 -.LP
12 11 .nf
13 12 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lpool\fR [ \fIlibrary\fR\&.\|.\|. ]
14 13 #include <pool.h>
15 14
16 15 \fBpool_value_class_t\fR \fBpool_get_property\fR(\fBpool_conf_t *\fR\fIconf\fR,
17 16 \fBconst pool_elem_t *\fR\fIelem\fR, \fBconst char *\fR\fIname\fR,
18 17 \fBpool_value_t *\fR\fIproperty\fR);
19 18 .fi
20 19
21 20 .LP
22 21 .nf
23 22 \fBint\fR \fBpool_put_property\fR(\fBpool_conf_t *\fR\fIconf\fR, \fBpool_elem_t *\fR\fIelem\fR,
24 23 \fBconst char *\fR\fIname\fR, \fBconst pool_value_t *\fR\fIvalue\fR);
25 24 .fi
26 25
27 26 .LP
28 27 .nf
29 28 \fBint\fR \fBpool_rm_property\fR(\fBpool_conf_t *\fR\fIconf\fR, \fBpool_elem_t *\fR\fIelem\fR,
30 29 \fBconst char *\fR\fIname\fR);
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
31 30 .fi
32 31
33 32 .LP
34 33 .nf
35 34 \fBint\fR \fBpool_walk_properties\fR(\fBpool_conf_t *\fR\fIconf\fR, \fBpool_elem_t *\fR\fIelem\fR,
36 35 \fBvoid *\fR\fIarg\fR, \fBint (*\fR\fIcallback\fR)(\fBpool_conf_t *\fR, \fBpool_elem_t *\fR,
37 36 \fBconst char *\fR, \fBpool_value_t *\fR, \fBvoid *\fR));
38 37 .fi
39 38
40 39 .SH DESCRIPTION
41 -.sp
42 -.LP
43 40 The various pool types are converted to the common pool element type
44 41 (\fBpool_elem_t\fR) before property manipulation. A \fBpool_value_t\fR is an
45 42 opaque type that contains a property value of one of the following types:
46 43 .sp
47 44 .ne 2
48 45 .na
49 46 \fB\fBPOC_UINT\fR\fR
50 47 .ad
51 48 .RS 14n
52 49 unsigned 64-bit integer
53 50 .RE
54 51
55 52 .sp
56 53 .ne 2
57 54 .na
58 55 \fB\fBPOC_INT\fR\fR
59 56 .ad
60 57 .RS 14n
61 58 signed 64-bit integer
62 59 .RE
63 60
64 61 .sp
65 62 .ne 2
66 63 .na
67 64 \fB\fBPOC_DOUBLE\fR\fR
68 65 .ad
69 66 .RS 14n
70 67 signed double-precision floating point value
71 68 .RE
72 69
73 70 .sp
74 71 .ne 2
75 72 .na
76 73 \fB\fBPOC_BOOL\fR\fR
77 74 .ad
78 75 .RS 14n
79 76 boolean value: 0 is false, non-zero is true
80 77 .RE
81 78
82 79 .sp
83 80 .ne 2
84 81 .na
85 82 \fB\fBPOC_STRING\fR\fR
86 83 .ad
87 84 .RS 14n
88 85 null-terminated string of characters
89 86 .RE
90 87
91 88 .sp
92 89 .LP
93 90 The \fIconf\fR argument for each function refers to the target configuration to
94 91 which the operation applies.
95 92 .sp
96 93 .LP
97 94 The \fBpool_get_property()\fR function attempts to retrieve the value of the
98 95 named property from the element. If the property is not found or an error
99 96 occurs, the value \fBPOC_INVAL\fR is returned to indicate error. Otherwise the
100 97 type of the value retrieved is returned.
101 98 .sp
102 99 .LP
↓ open down ↓ |
50 lines elided |
↑ open up ↑ |
103 100 The \fBpool_put_property()\fR function attempts to set the named property on
104 101 the element to the specified value. Attempting to set a property that does not
105 102 currently exist on the element will cause the property with the given name and
106 103 value to be created on the element and will not cause an error. An attempt to
107 104 overwrite an existing property with a new property of a different type is an
108 105 error.
109 106 .sp
110 107 .LP
111 108 The \fBpool_rm_property()\fR function attempts to remove the named property
112 109 from the element. If the property does not exist or is not removable, -1 is
113 -returned and \fBpool_error\fR(3POOL) reporst an error of \fBPOE_PUTPROP\fR.
110 +returned and \fBpool_error\fR(3POOL) reports an error of \fBPOE_PUTPROP\fR.
114 111 .sp
115 112 .LP
116 113 The \fBpool_walk_properties()\fR function invokes \fIcallback\fR on all
117 114 properties defined for the given element. The \fIcallback\fR is called with the
118 115 element itself, the name of the property, the value of the property, and the
119 116 caller-provided opaque argument.
120 117 .sp
121 118 .LP
122 119 A number of special properties are reserved for internal use and cannot be set
123 120 or removed. Attempting to do so will fail. These properties are documented on
124 121 the \fBlibpool\fR(3LIB) manual page.
125 122 .SH RETURN VALUES
126 -.sp
127 -.LP
128 123 Upon successful completion, \fBpool_get_property()\fR returns the type of the
129 124 property. Otherwise it returns \fBPOC_INVAL\fR and \fBpool_error()\fR returns
130 125 the pool-specific error value.
131 126 .sp
132 127 .LP
133 128 Upon successful completion, \fBpool_put_property()\fR,
134 129 \fBpool_rm_property()\fR, and \fBpool_walk_properties()\fR return 0. Otherwise
135 130 they return \(mi1 and \fBpool_error()\fR returns the pool-specific error value.
136 131 .SH ERRORS
137 -.sp
138 -.LP
139 132 The \fBpool_get_property()\fR function will fail if:
140 133 .sp
141 134 .ne 2
142 135 .na
143 136 \fB\fBPOE_BADPARAM\fR\fR
144 137 .ad
145 138 .RS 16n
146 139 The supplied configuration's status is not \fBPOF_VALID\fR, the supplied
147 140 \fIconf\fR does not contain the supplied \fIelem\fR, or the property is
148 141 restricted and cannot be accessed by the library.
149 142 .RE
150 143
151 144 .sp
152 145 .ne 2
153 146 .na
154 147 \fB\fBPOE_SYSTEM\fR\fR
155 148 .ad
156 149 .RS 16n
157 150 A system error has occurred. Check the system error code for more details.
158 151 .RE
159 152
160 153 .sp
161 154 .LP
162 155 The \fBpool_put_property()\fR function will fail if:
163 156 .sp
164 157 .ne 2
165 158 .na
166 159 \fB\fBPOE_BADPARAM\fR\fR
167 160 .ad
168 161 .RS 20n
169 162 The supplied configuration's status is not \fBPOF_VALID\fR, the supplied
170 163 \fIconf\fR does not contain the supplied \fIelem\fR, the property name is not
171 164 in the correct format, or the property already exists and the supplied type
172 165 does not match the existing type.
173 166 .RE
174 167
175 168 .sp
176 169 .ne 2
177 170 .na
178 171 \fB\fBPOE_SYSTEM\fR\fR
179 172 .ad
180 173 .RS 20n
181 174 A system error has occurred. Check the system error code for more details.
182 175 .RE
183 176
184 177 .sp
185 178 .ne 2
186 179 .na
187 180 \fB\fBPOE_PUTPROP\fR\fR
188 181 .ad
189 182 .RS 20n
190 183 The property name is reserved by \fBlibpool\fR and not available for use.
191 184 .RE
192 185
193 186 .sp
194 187 .ne 2
195 188 .na
196 189 \fB\fBPOE_INVALID_CONF\fR\fR
197 190 .ad
198 191 .RS 20n
199 192 The configuration is invalid.
200 193 .RE
201 194
202 195 .sp
203 196 .LP
204 197 The \fBpool_rm_property()\fR function will fail if:
205 198 .sp
206 199 .ne 2
207 200 .na
208 201 \fB\fBPOE_BADPARAM\fR\fR
209 202 .ad
210 203 .RS 16n
211 204 The supplied configuration's status is not \fBPOF_VALID\fR, the supplied
212 205 \fIconf\fR does not contain the supplied elem, or the property is reserved by
213 206 libpool and cannot be removed.
214 207 .RE
215 208
216 209 .sp
217 210 .ne 2
218 211 .na
219 212 \fB\fBPOE_SYSTEM\fR\fR
220 213 .ad
221 214 .RS 16n
222 215 A system error has occurred. Check the system error code for more details.
223 216 .RE
224 217
225 218 .sp
226 219 .ne 2
227 220 .na
228 221 \fB\fBPOE_PUTPROP\fR\fR
229 222 .ad
230 223 .RS 16n
231 224 The property name is reserved by \fBlibpool\fR and not available for use.
232 225 .RE
233 226
234 227 .sp
235 228 .LP
236 229 The \fBpool_walk_properties()\fR function will fail if:
237 230 .sp
238 231 .ne 2
239 232 .na
240 233 \fB\fBPOE_BADPARAM\fR\fR
241 234 .ad
242 235 .RS 16n
243 236 The supplied configuration's status is not \fBPOF_VALID\fR.
244 237 .RE
245 238
↓ open down ↓ |
97 lines elided |
↑ open up ↑ |
246 239 .sp
247 240 .ne 2
248 241 .na
249 242 \fB\fBPOE_SYSTEM\fR\fR
250 243 .ad
251 244 .RS 16n
252 245 A system error has occurred. Check the system error code for more details.
253 246 .RE
254 247
255 248 .SH ATTRIBUTES
256 -.sp
257 -.LP
258 249 See \fBattributes\fR(5) for descriptions of the following attributes:
259 250 .sp
260 251
261 252 .sp
262 253 .TS
263 254 box;
264 255 c | c
265 256 l | l .
266 257 ATTRIBUTE TYPE ATTRIBUTE VALUE
267 258 _
268 259 CSI Enabled
269 260 _
270 261 Interface Stability Unstable
271 262 _
272 263 MT-Level Safe
273 264 .TE
274 265
275 266 .SH SEE ALSO
276 -.sp
277 -.LP
278 267 \fBlibpool\fR(3LIB), \fBpool_error\fR(3POOL), \fBattributes\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX