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.man.txt
+++ new/usr/src/man/man3pool/pool_get_pool.3pool.man.txt
1 1 POOL_GET_POOL(3POOL) Pool Configuration Manipulation Library Functions
2 2
3 3
4 4
5 5 NAME
6 6 pool_get_pool, pool_get_resource, pool_query_components,
7 7 pool_query_pools, pool_query_resources - retrieve resource pool
8 8 configuration elements
9 9
10 10 SYNOPSIS
11 11 cc [ flag]... file... -lpool [ library... ]
12 12 #include <pool.h>
13 13
14 14 pool_t *pool_get_pool(pool_conf_t *conf, const char *name);
15 15
16 16
17 17 pool_resource_t *pool_get_resource(pool_conf_t *conf
18 18 const char *type, const char *name);
19 19
20 20
21 21 pool_component_t **pool_query_components(pool_conf_t *conf,
22 22 uint_t *nelem, pool_value_t **props);
23 23
24 24
25 25 pool_t **pool_query_pools(pool_conf_t *conf, uint_t *nelem,
26 26 pool_value_t **props);
27 27
28 28
29 29 pool_component_t **pool_query_resources(pool_conf_t *conf,
30 30 uint_t *nelem, pool_value_t **props);
31 31
32 32
33 33 DESCRIPTION
34 34 These functions provide a means for querying the contents of the
35 35 specified configuration. The conf argument for each function refers to
36 36 the target configuration to which the operation applies.
37 37
38 38
39 39 The pool_get_pool() function returns the pool with the given name from
40 40 the provided configuration.
41 41
42 42
43 43 The pool_get_resource() function returns the resource with the given
44 44 name and type from the provided configuration.
45 45
46 46
47 47 The pool_query_components() function retrieves all resource components
48 48 that match the given list of properties. If the list of properties is
49 49 NULL, all components are returned. The number of elements returned is
50 50 stored in the location pointed to by nelem. The value returned by
51 51 pool_query_components() is allocated with malloc(3C) and must be
52 52 explicitly freed.
53 53
54 54
55 55 The pool_query_pools() function behaves similarly to
56 56 pool_query_components() and returns the list of pools that match the
57 57 given list of properties. The value returned must be freed by the
58 58 caller.
59 59
60 60
61 61 The pool_query_resources() function similarly returns the list of
62 62 resources that match the given list of properties. The return value
63 63 must be freed by the caller.
64 64
65 65 RETURN VALUES
66 66 The pool_get_pool() and pool_get_resource() functions return the
67 67 matching pool and resource, respectively. Otherwise, they return NULL
↓ open down ↓ |
67 lines elided |
↑ open up ↑ |
68 68 and pool_error(3POOL) returns the pool-specific error value.
69 69
70 70
71 71 The pool_query_components(), pool_query_pools(), and
72 72 pool_query_resources() functions return a null-terminated array of
73 73 components, pools, and resources, respectively. If the query was
74 74 unsuccessful or there were no matches, NULL is returned and
75 75 pool_error() returns the pool-specific error value.
76 76
77 77 ERRORS
78 - The pool_get_pool() will fail if:
78 + The pool_get_pool() function will fail if:
79 79
80 80 POE_BADPARAM
81 81 The supplied configuration's status is not POF_VALID.
82 82
83 83
84 84
85 - The pool_get_resource() will fail if:
85 + The pool_get_resource() function will fail if:
86 86
87 87 POE_BADPARAM
88 88 The supplied configuration's status is not POF_VALID.
89 89
90 90
91 91 POE_SYSTEM
92 92 There is not enough memory available to allocate
93 93 working buffers. Check errno for the specific system
94 94 error code.
95 95
96 96
97 97
98 98 The pool_query_components(), pool_query_pools(), and
99 - pool_query_resources() will fail if:
99 + pool_query_resources() functions will fail if:
100 100
101 101 POE_BADPARAM
102 102 The supplied configuration's status is not
103 103 POF_VALID.
104 104
105 105
106 106 POE_INVALID_CONF
107 107 The query generated results that were not of the
108 108 correct type. The configuration is invalid.
109 109
110 110
111 111 POE_SYSTEM
112 112 There is not enough memory available to allocate
113 113 working buffers. Check errno for the specific
114 114 system error code.
115 115
116 116
117 117 EXAMPLES
118 118 Example 1 Retrieve the pool named "foo" from a given configuration.
119 119
120 120 #include <pool.h>
121 121 #include <stdio.h>
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
122 122
123 123 ...
124 124
125 125 pool_conf_t *conf;
126 126 pool_t *pool;
127 127
128 128 ...
129 129
130 130 if ((pool = pool_get_pool(conf, "foo")) == NULL) {
131 131 (void) fprintf(stderr, "Cannot retrieve pool named
132 - 'foo'\B{}n");
132 + 'foo'\n");
133 133 ...
134 134 }
135 135
136 136
137 137 ATTRIBUTES
138 138 See attributes(5) for descriptions of the following attributes:
139 139
140 140
141 141
142 142
143 143 +--------------------+-----------------+
144 144 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
145 145 +--------------------+-----------------+
146 146 |CSI | Enabled |
147 147 +--------------------+-----------------+
↓ open down ↓ |
5 lines elided |
↑ open up ↑ |
148 148 |Interface Stability | Unstable |
149 149 +--------------------+-----------------+
150 150 |MT-Level | Safe |
151 151 +--------------------+-----------------+
152 152
153 153 SEE ALSO
154 154 libpool(3LIB), pool_error(3POOL), attributes(5)
155 155
156 156
157 157
158 - July 18, 2005 POOL_GET_POOL(3POOL)
158 + January 18, 2020 POOL_GET_POOL(3POOL)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX