Print this page
12198 typo paramter in some section 3pool man pages
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3pool/pool_resource_create.3pool.man.txt
+++ new/usr/src/man/man3pool/pool_resource_create.3pool.man.txt
1 1 POOL_RESOURCE_CREATE(3POOL) Pool Configuration Manipulation Library Functions
2 2
3 3
4 4
5 5 NAME
6 6 pool_resource_create, pool_resource_destroy, pool_resource_info,
7 7 pool_query_resource_components, pool_resource_transfer,
8 8 pool_resource_xtransfer - resource pool resource manipulation functions
9 9
10 10 SYNOPSIS
11 11 cc [ flag... ] file... -lpool [ library... ]
12 12 #include <pool.h>
13 13
14 14 pool_resource_t *pool_resource_create(pool_conf_t *conf,
15 15 const char *type, const char *name);
16 16
17 17
18 18 int pool_resource_destroy(pool_conf_t *conf,
19 19 pool_resource_t *resource);
20 20
21 21
22 22 const char *pool_resource_info(pool_conf_t *conf
23 23 pool_resource_t *resource, int flags);
24 24
25 25
26 26 pool_component_t **pool_query_resource_components(
27 27 pool_conf_t *conf, pool_resource_t *resource,
28 28 uint_t *nelem, pool_value_t **props);
29 29
30 30
31 31 int pool_resource_transfer(pool_conf_t *conf,
32 32 pool_resource_t *source, pool_resource_t *target,
33 33 uint64_t size);
34 34
35 35
36 36 int pool_resource_xtransfer(pool_conf_t *conf,
37 37 pool_resource_t *source, pool_resource_t *target,
38 38 pool_component_t **components);
39 39
40 40
41 41 DESCRIPTION
42 42 The pool_resource_create() function creates and returns a new resource
43 43 of the given name and type in the provided configuration. If there is
44 44 already a resource of the given name, the operation will fail.
45 45
46 46
47 47 The pool_resource_destroy() function removes the specified resource
48 48 from its configuration file.
49 49
50 50
51 51 The pool_resource_info() function returns a string describing the given
52 52 resource. The string is allocated with malloc(3C). The caller is
53 53 responsible for freeing the returned string. If the flags argument is
54 54 non-zero, the string returned also describes the components (if any)
55 55 contained in the resource.
56 56
57 57
58 58 The pool_query_resource_components() function returns a null-terminated
59 59 array of the components (if any) that comprise the given resource.
60 60
61 61
62 62 The pool_resource_transfer() function transfers size basic units from
63 63 the source resource to the target. Both resources must be of the same
64 64 type for the operation to succeed. Transferring component resources,
65 65 such as processors, is always performed as series of
66 66 pool_resource_xtransfer() operations, since discrete resources must be
67 67 identified for transfer.
68 68
69 69
70 70 The pool_resource_xtransfer() function transfers the specific
71 71 components from the source resource to the target. Both resources must
72 72 be of the same type, and of a type that contains components (such as
73 73 processor sets). The components argument is a null-terminated list of
74 74 pool_component_t.
75 75
76 76
77 77 The conf argument for each function refers to the target configuration
78 78 to which the operation applies.
79 79
80 80 RETURN VALUES
81 81 Upon successful completion, pool_resource_create() returns a new
82 82 pool_resource_t with default properties initialized. Otherwise, NULL is
83 83 returned and pool_error(3POOL) returns the pool-specific error value.
84 84
85 85
86 86 Upon successful completion, pool_resource_destroy() returns 0.
↓ open down ↓ |
86 lines elided |
↑ open up ↑ |
87 87 Otherwise, -1 is returned and pool_error() returns the pool-specific
88 88 error value.
89 89
90 90
91 91 Upon successful completion, pool_resource_info() returns a string
92 92 describing the given resource (and optionally its components).
93 93 Otherwise, NULL is returned and pool_error() returns the pool-specific
94 94 error value.
95 95
96 96
97 - Upon successful completion, pool_query_resource_components() returns a
97 + Upon successful completion, pool_query_resource_components() returns a
98 98 null-terminated array of pool_component_t * that match the provided
99 99 null-terminated property list and are contained in the given resource.
100 100 Otherwise, NULL is returned and pool_error() returns the pool-specific
101 101 error value.
102 102
103 103
104 - Upon successful completion, pool_resource_transfer() and
104 + Upon successful completion, pool_resource_transfer() and
105 105 pool_resource_xtransfer() return 0. Otherwise -1 is returned and
106 106 pool_error() returns the pool-specific error value.
107 107
108 108 ERRORS
109 109 The pool_resource_create() function will fail if:
110 110
111 111 POE_BADPARAM
112 112 The supplied configuration's status is not
113 113 POF_VALID or name is in use for this resource type.
114 114
115 115
116 116 POE_INVALID_CONF
117 117 The resource element could not be created because
118 118 the configuration would be invalid.
119 119
120 120
121 121 POE_PUTPROP
122 122 One of the supplied properties could not be set.
123 123
124 124
125 125 POE_SYSTEM
126 126 A system error has occurred. Check the system
127 127 error code for more details.
128 128
129 129
130 130
131 131 The pool_resource_destroy() function will fail if:
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
132 132
133 133 POE_BADPARAM
134 134 The supplied configuration's status is not POF_VALID.
135 135
136 136
137 137
138 138 The pool_resource_info() function will fail if:
139 139
140 140 POE_BADPARAM
141 141 The supplied configuration's status is not
142 - POF_VALID or the flags paramter is neither 0 nor 1.
142 + POF_VALID or the flags parameter is neither 0 nor
143 + 1.
143 144
144 145
145 146 POE_INVALID_CONF
146 147 The configuration is invalid.
147 148
148 149
149 150 POE_SYSTEM
150 151 A system error has occurred. Check the system error
151 152 code for more details.
152 153
153 154
154 155
155 156 The pool_query_resource_components() function will fail if:
156 157
157 158 POE_BADPARAM
158 159 The supplied configuration's status is not
159 160 POF_VALID.
160 161
161 162
162 163 POE_INVALID_CONF
163 164 The configuration is invalid.
164 165
165 166
166 167 POE_SYSTEM
167 168 A system error has occurred. Check the system error
168 169 code for more details.
169 170
170 171
171 172
172 173 The pool_resource_transfer() function will fail if:
173 174
174 175 POE_BADPARAM
175 176 The supplied configuration's status is not POF_VALID,
176 177 the two resources are not of the same type, or the
177 178 transfer would cause either of the resources to exceed
178 179 their min and max properties.
179 180
180 181
181 182 POE_SYSTEM
182 183 A system error has occurred. Check the system error
183 184 code for more details.
184 185
185 186
186 187
187 188 The pool_resource_xtransfer() function will fail if:
188 189
189 190 POE_BADPARAM
190 191 The supplied configuration's status is not
191 192 POF_VALID, the two resources are not of the same
192 193 type, or the supplied resources do not belong to
193 194 the source.
194 195
195 196
196 197 POE_INVALID_CONF
197 198 The transfer operation failed and the configuration
198 199 may be invalid.
199 200
200 201
201 202 POE_SYSTEM
202 203 A system error has occurred. Check the system error
203 204 code for more details.
204 205
205 206
206 207 EXAMPLES
207 208 Example 1 Create a new resource of type pset named foo.
208 209
209 210 #include <pool.h>
210 211 #include <stdio.h>
211 212
212 213 ...
213 214
214 215 pool_conf_t *conf;
215 216 pool_resource_t *resource;
216 217 ...
217 218
218 219 if ((resource = pool_resource_create(conf, "pset",
219 220 "foo")) == NULL) {
220 221 (void) fprintf(stderr, "Cannot create resource\B{}n");
221 222 ...
222 223 }
223 224
224 225
225 226 ATTRIBUTES
226 227 See attributes(5) for descriptions of the following attributes:
227 228
228 229
229 230
230 231
231 232 +--------------------+-----------------+
232 233 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
233 234 +--------------------+-----------------+
234 235 |CSI | Enabled |
235 236 +--------------------+-----------------+
↓ open down ↓ |
83 lines elided |
↑ open up ↑ |
236 237 |Interface Stability | Unstable |
237 238 +--------------------+-----------------+
238 239 |MT-Level | Safe |
239 240 +--------------------+-----------------+
240 241
241 242 SEE ALSO
242 243 libpool(3LIB), pool_error(3POOL), attributes(5)
243 244
244 245
245 246
246 - April 9, 2016 POOL_RESOURCE_CREATE(3POOL)
247 + January 15, 2020 POOL_RESOURCE_CREATE(3POOL)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX