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.man.txt
+++ new/usr/src/man/man3contract/ct_dev_tmpl_set_aset.3contract.man.txt
1 1 CT_DEV_TMPL_SET_ASET(3CONTRACT) Contract Management Library Functions
2 2
3 3
4 4
5 5 NAME
6 6 ct_dev_tmpl_set_aset, ct_dev_tmpl_get_aset, ct_dev_tmpl_set_minor,
7 7 ct_dev_tmpl_get_minor, ct_dev_tmpl_set_noneg, ct_dev_tmpl_clear_noneg,
8 8 ct_dev_tmpl_get_noneg - device contract template functions
9 9
10 10 SYNOPSIS
11 11 cc [ flag... ] file... -D_LARGEFILE64_SOURCE -lcontract [ library... ]
12 12 #include <libcontract.h>
13 13 #include <sys/contract/device.h>
14 14
15 15 int ct_dev_tmpl_set_aset(int fd, uint_t aset);
16 16
17 17
18 18 int ct_dev_tmpl_get_aset(int fd, uint_t *asetp);
19 19
20 20
21 21 int ct_dev_tmpl_set_minor(int fd, char *minor);
22 22
23 23
24 24 int ct_dev_tmpl_get_minor(int fd, char *buf, size_t *buflenp);
25 25
26 26
27 27 int ct_dev_tmpl_set_noneg(int fd);
28 28
29 29
30 30 int ct_dev_tmpl_clear_noneg(int fd);
31 31
32 32
33 33 int ct_dev_tmpl_get_noneg(int fd, uint_t *nonegp);
34 34
35 35
36 36 PARAMETERS
37 37 aset
38 38 a bitset of one or more of device states
39 39
40 40
41 41 asetp
42 42 a pointer to a variable into which the current A-set is to
43 43 be returned
44 44
45 45
46 46 buf
47 47 a buffer into which the minor path is to be returned
48 48
49 49
50 50 buflenp
51 51 a pointer to variable of type size_t in which the size of
52 52 the buffer buf is passed in. If the buffer is too small the
53 53 size of the buffer needed for a successful call is passed
54 54 back to the caller.
55 55
56 56
57 57 fd
58 58 a file descriptor from an open of the device contract
59 59 template file in the contract filesystem (ctfs)
60 60
61 61
62 62 minor
63 63 the devfs path (the /devices path without the "/devices"
64 64 prefix) of a minor which is to be the subject of a contract
65 65
66 66
67 67 nonegp
68 68 a pointer to a uint_t variable for receiving the current
69 69 setting of the "nonnegotiable" term in the template
70 70
71 71
72 72 DESCRIPTION
73 73 These functions read and write device contract terms and operate on
74 74 device contract template file descriptors obtained from the contract(4)
75 75 filesystem (ctfs).
76 76
77 77
78 78 The ct_dev_tmpl_set_aset() and ct_dev_tmpl_get_aset() functions write
79 79 and read the "acceptable states" set (or A-set for short). This is the
80 80 set of device states guaranteed by the contract. Any departure from
81 81 these states will result in the breaking of the contract and a delivery
82 82 of a critical contract event to the contract holder. The A-set value is
83 83 a bitset of one or more of the following device states:
84 84 CT_DEV_EV_ONLINE, CT_DEV_EV_DEGRADED, and CT_DEV_EV_OFFLINE.
85 85
86 86
87 87 The ct_dev_tmpl_set_minor() and ct_dev_tmpl_get_minor() functions write
88 88 and read the minor term (the device resource that is to be the subject
89 89 of the contract.) The value is a devfs path to a device minor node
90 90 (minus the "/devices" prefix). For the ct_dev_tmpl_get_minor()
91 91 function, a buffer at least PATH_MAX in size must be passed in. If the
92 92 buffer is smaller than PATH_MAX, then the minimum size of the buffer
93 93 required (PATH_MAX) for this function is passed back to the caller via
94 94 the buflenp argument.
95 95
96 96
97 97 The ct_dev_tmpl_set_noneg() and ct_dev_tmpl_get_noneg() functions write
98 98 and read the nonnegotiable term. If this term is set, synchronous
99 99 negotiation events are automatically NACKed on behalf of the contract
100 100 holder. For ct_dev_tmpl_get_noneg(), the variable pointed to by nonegp
101 101 is set to 1 if the "noneg" term is set or to 0 otherwise. The
102 102 ct_dev_tmpl_clear_noneg() term clears the nonnegotiable term from a
103 103 template.
104 104
105 105 RETURN VALUES
106 106 Upon successful completion, these functions return 0. Otherwise, they
107 107 return a non-zero error value.
108 108
109 109 ERRORS
110 110 The ct_dev_tmpl_set_aset() function will fail if:
111 111
112 112 EINVAL
113 113 A template file descriptor or A-set is invalid
114 114
115 115
116 116
117 117 The ct_dev_tmpl_set_minor() function will fail if:
118 118
119 119 EINVAL
120 120 One or more arguments is invalid.
121 121
122 122
123 123 ENXIO
124 124 The minor named by minor path does not exist.
125 125
126 126
127 127
128 128 The ct_dev_tmpl_set_noneg() function will fail if:
129 129
130 130 EPERM
131 131 A process lacks sufficient privilege to NACK a device state
132 132 change.
133 133
134 134
135 135
136 136 The ct_dev_tmpl_get_aset() and ct_dev_tmpl_get_minor() functions will
137 137 fail if:
138 138
139 139 EINVAL
140 140 One or more arguments is invalid.
141 141
142 142
143 143 ENOENT
144 144 The requested term is not set.
145 145
146 146
↓ open down ↓ |
146 lines elided |
↑ open up ↑ |
147 147
148 148 The ct_dev_tmpl_get_noneg() function will fail if:
149 149
150 150 EINVAL
151 151 One or more arguments is invalid.
152 152
153 153
154 154
155 155 The ct_dev_tmpl_get_minor() function will fail if:
156 156
157 - EOVEFLOW
157 + EOVERFLOW
158 158 The supplied buffer is too small.
159 159
160 160
161 161 ATTRIBUTES
162 162 See attributes(5) for descriptions of the following attributes:
163 163
164 164
165 165
166 166
167 167 +--------------------+-----------------+
168 168 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
169 169 +--------------------+-----------------+
170 170 |Interface Stability | Committed |
171 171 +--------------------+-----------------+
172 172 |MT-Level | Safe |
173 173 +--------------------+-----------------+
174 174
175 175 SEE ALSO
176 176 libcontract(3LIB), contract(4), devices(4), attributes(5), lfcompile(5)
177 177
178 178
179 179
180 180 August 9, 2007 CT_DEV_TMPL_SET_ASET(3CONTRACT)
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX