summaryrefslogtreecommitdiff
path: root/usr/src/man/man3pool/pool_error.3pool
blob: a5c1f360f87948f379fb6bfc6502ccc104788be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
'\" te
.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.\" 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.
.\" 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.
.\" 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]
.TH POOL_ERROR 3POOL "Sep 23, 2003"
.SH NAME
pool_error, pool_strerror \- error interface to resource pools library
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lpool\fR [ \fIlibrary\fR\&.\|.\|. ]
#include <pool.h>

\fBint\fR \fBpool_error\fR(\fBvoid\fR);
.fi

.LP
.nf
\fBconst char *\fR\fBpool_strerror\fR(\fBint\fR \fIperr\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBpool_error()\fR function returns the error value of the last failure
recorded by the invocation of one of the functions of the resource pool
configuration library, \fBlibpool\fR.
.sp
.LP
The \fBpool_strerror()\fR function returns a descriptive null-terminated string
for each of the valid pool error codes.
.sp
.LP
The following error codes can be returned by \fBpool_error()\fR:
.SH RETURN VALUES
.sp
.LP
The \fBpool_error()\fR function returns the current pool error value for the
calling thread from among the following:
.sp
.ne 2
.na
\fB\fBPOE_ACCESS\fR\fR
.ad
.RS 22n
The operation could not be performed because the configuration was not opened
with the correct opening permissions.
.RE

.sp
.ne 2
.na
\fB\fBPOE_BADPARAM\fR\fR
.ad
.RS 22n
A bad parameter was supplied.
.RE

.sp
.ne 2
.na
\fB\fBPOE_BAD_PROP_TYPE\fR\fR
.ad
.RS 22n
An incorrect property type was submitted or encountered during the pool
operation.
.RE

.sp
.ne 2
.na
\fB\fBPOE_DATASTORE\fR\fR
.ad
.RS 22n
An error occurred within permanent storage.
.RE

.sp
.ne 2
.na
\fB\fBPOE_INVALID_CONF\fR\fR
.ad
.RS 22n
The pool configuration presented for the operation is invalid.
.RE

.sp
.ne 2
.na
\fB\fBPOE_INVALID_SEARCH\fR\fR
.ad
.RS 22n
A query whose outcome set was empty was attempted.
.RE

.sp
.ne 2
.na
\fB\fBPOE_NOTSUP\fR\fR
.ad
.RS 22n
An unsupported operation was attempted.
.RE

.sp
.ne 2
.na
\fB\fBPOE_PUTPROP\fR\fR
.ad
.RS 22n
An attempt to write a read-only property was made.
.RE

.sp
.ne 2
.na
\fB\fBPOE_OK\fR\fR
.ad
.RS 22n
The previous pool operation succeeded.
.RE

.sp
.ne 2
.na
\fB\fBPOE_SYSTEM\fR\fR
.ad
.RS 22n
An underlying system call or library function failed; \fBerrno\fR(3C) is
preserved where possible.
.RE

.sp
.LP
The \fBpool_strerror()\fR function returns a pointer to the string
corresponding to the requested error value. If the error value has no
corresponding string, \(mi1 is returned and \fBerrno\fR is set to indicate the
error.
.SH ERRORS
.sp
.LP
The \fBpool_strerror()\fR function will fail if:
.sp
.ne 2
.na
\fB\fBESRCH\fR\fR
.ad
.RS 9n
The specified error value is not defined by the pools error facility.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
CSI	Enabled
_
Interface Stability	Unstable
_
MT-Level	Safe
.TE

.SH SEE ALSO
.sp
.LP
\fBerrno\fR(3C), \fBlibpool\fR(3LIB), pool_error(3POOL), \fBattributes\fR(5)