Print this page
10067 Miscellaneous man page typos
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Volker A. Brandt <vab@bb-c.de>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3contract/ct_dev_tmpl_set_aset.3contract
+++ new/usr/src/man/man3contract/ct_dev_tmpl_set_aset.3contract
1 1 '\" te
2 2 .\" Copyright (c) 2007, 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 6 .TH CT_DEV_TMPL_SET_ASET 3CONTRACT "Aug 9, 2007"
7 7 .SH NAME
8 8 ct_dev_tmpl_set_aset, ct_dev_tmpl_get_aset, ct_dev_tmpl_set_minor,
9 9 ct_dev_tmpl_get_minor, ct_dev_tmpl_set_noneg, ct_dev_tmpl_clear_noneg,
10 10 ct_dev_tmpl_get_noneg \- device contract template functions
11 11 .SH SYNOPSIS
12 12 .LP
13 13 .nf
14 14 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-D_LARGEFILE64_SOURCE\fR \fB -lcontract \fR [ \fIlibrary\fR\&.\|.\|. ]
15 15 #include <libcontract.h>
16 16 #include <sys/contract/device.h>
17 17
18 18 int ct_dev_tmpl_set_aset(int fd, uint_t aset);
19 19 .fi
20 20
21 21 .LP
22 22 .nf
23 23 \fBint\fR \fBct_dev_tmpl_get_aset\fR(\fBint\fR \fIfd\fR, \fBuint_t *\fR\fIasetp\fR);
24 24 .fi
25 25
26 26 .LP
27 27 .nf
28 28 \fBint\fR \fBct_dev_tmpl_set_minor\fR(\fBint\fR \fIfd\fR, \fBchar *\fR\fIminor\fR);
29 29 .fi
30 30
31 31 .LP
32 32 .nf
33 33 \fBint\fR \fBct_dev_tmpl_get_minor\fR(\fBint\fR \fIfd\fR, \fBchar *\fR\fIbuf\fR, \fBsize_t *\fR\fIbuflenp\fR);
34 34 .fi
35 35
36 36 .LP
37 37 .nf
38 38 \fBint\fR \fBct_dev_tmpl_set_noneg\fR(\fBint\fR \fIfd\fR);
39 39 .fi
40 40
41 41 .LP
↓ open down ↓ |
41 lines elided |
↑ open up ↑ |
42 42 .nf
43 43 \fBint\fR \fBct_dev_tmpl_clear_noneg\fR(\fBint\fR \fIfd\fR);
44 44 .fi
45 45
46 46 .LP
47 47 .nf
48 48 \fBint\fR \fBct_dev_tmpl_get_noneg\fR(\fBint\fR \fIfd\fR, \fBuint_t *\fR\fInonegp\fR);
49 49 .fi
50 50
51 51 .SH PARAMETERS
52 -.sp
53 52 .ne 2
54 53 .na
55 54 \fB\fIaset\fR\fR
56 55 .ad
57 56 .RS 11n
58 57 a bitset of one or more of device states
59 58 .RE
60 59
61 60 .sp
62 61 .ne 2
63 62 .na
64 63 \fB\fIasetp\fR\fR
65 64 .ad
66 65 .RS 11n
67 66 a pointer to a variable into which the current A-set is to be returned
68 67 .RE
69 68
70 69 .sp
71 70 .ne 2
72 71 .na
73 72 \fB\fIbuf\fR\fR
74 73 .ad
75 74 .RS 11n
76 75 a buffer into which the minor path is to be returned
77 76 .RE
78 77
79 78 .sp
80 79 .ne 2
81 80 .na
82 81 \fB\fIbuflenp\fR\fR
83 82 .ad
84 83 .RS 11n
85 84 a pointer to variable of type \fBsize_t\fR in which the size of the buffer
86 85 \fIbuf\fR is passed in. If the buffer is too small the size of the buffer
87 86 needed for a successful call is passed back to the caller.
88 87 .RE
89 88
90 89 .sp
91 90 .ne 2
92 91 .na
93 92 \fB\fIfd\fR\fR
94 93 .ad
95 94 .RS 11n
96 95 a file descriptor from an open of the device contract template file in the
97 96 contract filesystem (ctfs)
98 97 .RE
99 98
100 99 .sp
101 100 .ne 2
102 101 .na
103 102 \fB\fIminor\fR\fR
104 103 .ad
105 104 .RS 11n
106 105 the \fBdevfs\fR path (the \fB/devices\fR path without the "\fB/devices\fR"
107 106 prefix) of a minor which is to be the subject of a contract
108 107 .RE
109 108
110 109 .sp
↓ open down ↓ |
48 lines elided |
↑ open up ↑ |
111 110 .ne 2
112 111 .na
113 112 \fB\fInonegp\fR\fR
114 113 .ad
115 114 .RS 11n
116 115 a pointer to a \fIuint_t\fR variable for receiving the current setting of the
117 116 "nonnegotiable" term in the template
118 117 .RE
119 118
120 119 .SH DESCRIPTION
121 -.sp
122 120 .LP
123 121 These functions read and write device contract terms and operate on device
124 122 contract template file descriptors obtained from the \fBcontract\fR(4)
125 123 filesystem (ctfs).
126 124 .sp
127 125 .LP
128 126 The \fBct_dev_tmpl_set_aset()\fR and \fBct_dev_tmpl_get_aset()\fR functions
129 127 write and read the "acceptable states" set (or A-set for short). This is the
130 128 set of device states guaranteed by the contract. Any departure from these
131 129 states will result in the breaking of the contract and a delivery of a critical
132 130 contract event to the contract holder. The A-set value is a bitset of one or
133 131 more of the following device states: \fBCT_DEV_EV_ONLINE\fR,
134 132 \fBCT_DEV_EV_DEGRADED\fR, and \fBCT_DEV_EV_OFFLINE\fR.
135 133 .sp
136 134 .LP
137 135 The \fBct_dev_tmpl_set_minor()\fR and \fBct_dev_tmpl_get_minor()\fR functions
138 136 write and read the minor term (the device resource that is to be the subject of
139 137 the contract.) The value is a \fBdevfs\fR path to a device minor node (minus
140 138 the "\fB/devices\fR" prefix). For the \fBct_dev_tmpl_get_minor()\fR function, a
141 139 buffer at least \fBPATH_MAX\fR in size must be passed in. If the buffer is
142 140 smaller than \fBPATH_MAX\fR, then the minimum size of the buffer required
143 141 (\fBPATH_MAX\fR) for this function is passed back to the caller via the
144 142 \fIbuflenp\fR argument.
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
145 143 .sp
146 144 .LP
147 145 The \fBct_dev_tmpl_set_noneg()\fR and \fBct_dev_tmpl_get_noneg()\fR functions
148 146 write and read the nonnegotiable term. If this term is set, synchronous
149 147 negotiation events are automatically NACKed on behalf of the contract holder.
150 148 For \fBct_dev_tmpl_get_noneg()\fR, the variable pointed to by \fInonegp\fR is
151 149 set to 1 if the "noneg" term is set or to 0 otherwise. The
152 150 \fBct_dev_tmpl_clear_noneg()\fR term clears the nonnegotiable term from a
153 151 template.
154 152 .SH RETURN VALUES
155 -.sp
156 153 .LP
157 154 Upon successful completion, these functions return 0. Otherwise, they return a
158 155 non-zero error value.
159 156 .SH ERRORS
160 -.sp
161 157 .LP
162 158 The \fBct_dev_tmpl_set_aset()\fR function will fail if:
163 159 .sp
164 160 .ne 2
165 161 .na
166 162 \fB\fBEINVAL\fR\fR
167 163 .ad
168 164 .RS 10n
169 165 A template file descriptor or A-set is invalid
170 166 .RE
171 167
172 168 .sp
173 169 .LP
174 170 The \fBct_dev_tmpl_set_minor()\fR function will fail if:
175 171 .sp
176 172 .ne 2
177 173 .na
178 174 \fB\fBEINVAL\fR\fR
179 175 .ad
180 176 .RS 10n
181 177 One or more arguments is invalid.
182 178 .RE
183 179
184 180 .sp
185 181 .ne 2
186 182 .na
187 183 \fB\fBENXIO\fR\fR
188 184 .ad
189 185 .RS 10n
190 186 The minor named by minor path does not exist.
191 187 .RE
192 188
193 189 .sp
194 190 .LP
195 191 The \fBct_dev_tmpl_set_noneg()\fR function will fail if:
196 192 .sp
197 193 .ne 2
198 194 .na
199 195 \fB\fBEPERM\fR\fR
200 196 .ad
201 197 .RS 9n
202 198 A process lacks sufficient privilege to NACK a device state change.
203 199 .RE
204 200
205 201 .sp
206 202 .LP
207 203 The \fBct_dev_tmpl_get_aset()\fR and \fBct_dev_tmpl_get_minor()\fR functions
208 204 will fail if:
209 205 .sp
210 206 .ne 2
211 207 .na
212 208 \fB\fBEINVAL\fR\fR
213 209 .ad
214 210 .RS 10n
215 211 One or more arguments is invalid.
216 212 .RE
217 213
218 214 .sp
219 215 .ne 2
220 216 .na
221 217 \fB\fBENOENT\fR\fR
222 218 .ad
223 219 .RS 10n
224 220 The requested term is not set.
225 221 .RE
226 222
227 223 .sp
228 224 .LP
229 225 The \fBct_dev_tmpl_get_noneg()\fR function will fail if:
230 226 .sp
231 227 .ne 2
232 228 .na
233 229 \fB\fBEINVAL\fR\fR
234 230 .ad
↓ open down ↓ |
64 lines elided |
↑ open up ↑ |
235 231 .RS 10n
236 232 One or more arguments is invalid.
237 233 .RE
238 234
239 235 .sp
240 236 .LP
241 237 The \fBct_dev_tmpl_get_minor()\fR function will fail if:
242 238 .sp
243 239 .ne 2
244 240 .na
245 -\fB\fBEOVEFLOW\fR\fR
241 +\fB\fBEOVERFLOW\fR\fR
246 242 .ad
247 243 .RS 12n
248 244 The supplied buffer is too small.
249 245 .RE
250 246
251 247 .SH ATTRIBUTES
252 -.sp
253 248 .LP
254 249 See \fBattributes\fR(5) for descriptions of the following attributes:
255 250 .sp
256 251
257 252 .sp
258 253 .TS
259 254 box;
260 255 c | c
261 256 l | l .
262 257 ATTRIBUTE TYPE ATTRIBUTE VALUE
263 258 _
264 259 Interface Stability Committed
265 260 _
266 261 MT-Level Safe
267 262 .TE
268 263
269 264 .SH SEE ALSO
270 -.sp
271 265 .LP
272 266 \fBlibcontract\fR(3LIB), \fBcontract\fR(4), \fBdevices\fR(4),
273 267 \fBattributes\fR(5), \fBlfcompile\fR(5)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX