Print this page
12202 noise in example code in some section 3pool man pages
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3pool/pool_get_pool.3pool
+++ new/usr/src/man/man3pool/pool_get_pool.3pool
1 1 '\" te
2 2 .\" Copyright (c) 2005, 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_POOL 3POOL "Jul 18, 2005"
6 +.TH POOL_GET_POOL 3POOL "January 18, 2020"
7 7 .SH NAME
8 8 pool_get_pool, pool_get_resource, pool_query_components, pool_query_pools,
9 9 pool_query_resources \- retrieve resource pool configuration elements
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_t *\fR\fBpool_get_pool\fR(\fBpool_conf_t *\fR\fIconf\fR, \fBconst char *\fR\fIname\fR);
17 16 .fi
18 17
19 18 .LP
20 19 .nf
21 20 \fBpool_resource_t *\fR\fBpool_get_resource\fR(\fBpool_conf_t *\fR\fIconf\fR
22 21 \fBconst char *\fR\fItype\fR, \fBconst char *\fR\fIname\fR);
23 22 .fi
24 23
25 24 .LP
26 25 .nf
27 26 \fBpool_component_t **\fR\fBpool_query_components\fR(\fBpool_conf_t *\fR\fIconf\fR,
28 27 \fBuint_t *\fR\fInelem\fR, \fBpool_value_t **\fR\fIprops\fR);
29 28 .fi
30 29
31 30 .LP
32 31 .nf
33 32 \fBpool_t **\fR\fBpool_query_pools\fR(\fBpool_conf_t *\fR\fIconf\fR, \fBuint_t *\fR\fInelem\fR,
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
34 33 \fBpool_value_t **\fR\fIprops\fR);
35 34 .fi
36 35
37 36 .LP
38 37 .nf
39 38 \fBpool_component_t **\fR\fBpool_query_resources\fR(\fBpool_conf_t *\fR\fIconf\fR,
40 39 \fBuint_t *\fR\fInelem\fR, \fBpool_value_t **\fR\fIprops\fR);
41 40 .fi
42 41
43 42 .SH DESCRIPTION
44 -.sp
45 -.LP
46 43 These functions provide a means for querying the contents of the specified
47 44 configuration. The \fIconf\fR argument for each function refers to the target
48 45 configuration to which the operation applies.
49 46 .sp
50 47 .LP
51 48 The \fBpool_get_pool()\fR function returns the pool with the given name from
52 49 the provided configuration.
53 50 .sp
54 51 .LP
55 52 The \fBpool_get_resource()\fR function returns the resource with the given name
56 53 and type from the provided configuration.
57 54 .sp
58 55 .LP
59 56 The \fBpool_query_components()\fR function retrieves all resource components
60 57 that match the given list of properties. If the list of properties is
61 58 \fINULL\fR, all components are returned. The number of elements returned is
62 59 stored in the location pointed to by \fInelem\fR. The value returned by
63 60 \fBpool_query_components()\fR is allocated with \fBmalloc\fR(3C) and must be
64 61 explicitly freed.
65 62 .sp
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
66 63 .LP
67 64 The \fBpool_query_pools()\fR function behaves similarly to
68 65 \fBpool_query_components()\fR and returns the list of pools that match the
69 66 given list of properties. The value returned must be freed by the caller.
70 67 .sp
71 68 .LP
72 69 The \fBpool_query_resources()\fR function similarly returns the list of
73 70 resources that match the given list of properties. The return value must be
74 71 freed by the caller.
75 72 .SH RETURN VALUES
76 -.sp
77 -.LP
78 73 The \fBpool_get_pool()\fR and \fBpool_get_resource()\fR functions return the
79 74 matching pool and resource, respectively. Otherwise, they return \fINULL\fR and
80 75 \fBpool_error\fR(3POOL) returns the pool-specific error value.
81 76 .sp
82 77 .LP
83 78 The \fBpool_query_components()\fR, \fBpool_query_pools()\fR, and
84 79 \fBpool_query_resources()\fR functions return a null-terminated array of
85 80 components, pools, and resources, respectively. If the query was unsuccessful
86 81 or there were no matches, \fINULL\fR is returned and \fBpool_error()\fR returns
87 82 the pool-specific error value.
88 83 .SH ERRORS
84 +The \fBpool_get_pool()\fR function will fail if:
89 85 .sp
90 -.LP
91 -The \fBpool_get_pool()\fR will fail if:
92 -.sp
93 86 .ne 2
94 87 .na
95 88 \fB\fBPOE_BADPARAM\fR\fR
96 89 .ad
97 90 .RS 16n
98 91 The supplied configuration's status is not \fBPOF_VALID\fR.
99 92 .RE
100 93
101 94 .sp
102 95 .LP
103 -The \fBpool_get_resource()\fR will fail if:
96 +The \fBpool_get_resource()\fR function will fail if:
104 97 .sp
105 98 .ne 2
106 99 .na
107 100 \fB\fBPOE_BADPARAM\fR\fR
108 101 .ad
109 102 .RS 16n
110 103 The supplied configuration's status is not \fBPOF_VALID\fR.
111 104 .RE
112 105
113 106 .sp
114 107 .ne 2
115 108 .na
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
116 109 \fB\fBPOE_SYSTEM\fR\fR
117 110 .ad
118 111 .RS 16n
119 112 There is not enough memory available to allocate working buffers. Check
120 113 \fBerrno\fR for the specific system error code.
121 114 .RE
122 115
123 116 .sp
124 117 .LP
125 118 The \fBpool_query_components()\fR, \fBpool_query_pools()\fR, and
126 -\fBpool_query_resources()\fR will fail if:
119 +\fBpool_query_resources()\fR functions will fail if:
127 120 .sp
128 121 .ne 2
129 122 .na
130 123 \fB\fBPOE_BADPARAM\fR\fR
131 124 .ad
132 125 .RS 20n
133 126 The supplied configuration's status is not \fBPOF_VALID\fR.
134 127 .RE
135 128
136 129 .sp
137 130 .ne 2
138 131 .na
139 132 \fB\fBPOE_INVALID_CONF\fR\fR
140 133 .ad
141 134 .RS 20n
142 135 The query generated results that were not of the correct type. The
143 136 configuration is invalid.
144 137 .RE
145 138
146 139 .sp
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
147 140 .ne 2
148 141 .na
149 142 \fB\fBPOE_SYSTEM\fR\fR
150 143 .ad
151 144 .RS 20n
152 145 There is not enough memory available to allocate working buffers. Check
153 146 \fBerrno\fR for the specific system error code.
154 147 .RE
155 148
156 149 .SH EXAMPLES
157 -.LP
158 150 \fBExample 1 \fRRetrieve the pool named "foo" from a given configuration.
159 151 .sp
160 152 .in +2
161 153 .nf
162 154 #include <pool.h>
163 155 #include <stdio.h>
164 156
165 157 \&...
166 158
167 159 pool_conf_t *conf;
168 160 pool_t *pool;
169 161
170 162 \&...
171 163
172 164 if ((pool = pool_get_pool(conf, "foo")) == NULL) {
173 165 (void) fprintf(stderr, "Cannot retrieve pool named
174 - 'foo'\\B{}n");
166 + 'foo'\\n");
175 167 ...
176 168 }
177 169 .fi
178 170 .in -2
179 171
180 172 .SH ATTRIBUTES
181 -.sp
182 -.LP
183 173 See \fBattributes\fR(5) for descriptions of the following attributes:
184 174 .sp
185 175
186 176 .sp
187 177 .TS
188 178 box;
189 179 c | c
190 180 l | l .
191 181 ATTRIBUTE TYPE ATTRIBUTE VALUE
192 182 _
193 183 CSI Enabled
194 184 _
195 185 Interface Stability Unstable
196 186 _
197 187 MT-Level Safe
198 188 .TE
199 189
200 190 .SH SEE ALSO
201 -.sp
202 -.LP
203 191 \fBlibpool\fR(3LIB), \fBpool_error\fR(3POOL), \fBattributes\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX