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>


  32 .nf
  33 \fBint\fR \fBct_dev_tmpl_get_minor\fR(\fBint\fR \fIfd\fR, \fBchar *\fR\fIbuf\fR, \fBsize_t *\fR\fIbuflenp\fR);
  34 .fi
  35 
  36 .LP
  37 .nf
  38 \fBint\fR \fBct_dev_tmpl_set_noneg\fR(\fBint\fR \fIfd\fR);
  39 .fi
  40 
  41 .LP
  42 .nf
  43 \fBint\fR \fBct_dev_tmpl_clear_noneg\fR(\fBint\fR \fIfd\fR);
  44 .fi
  45 
  46 .LP
  47 .nf
  48 \fBint\fR \fBct_dev_tmpl_get_noneg\fR(\fBint\fR \fIfd\fR, \fBuint_t *\fR\fInonegp\fR);
  49 .fi
  50 
  51 .SH PARAMETERS
  52 .sp
  53 .ne 2
  54 .na
  55 \fB\fIaset\fR\fR
  56 .ad
  57 .RS 11n
  58 a bitset of one or more of device states
  59 .RE
  60 
  61 .sp
  62 .ne 2
  63 .na
  64 \fB\fIasetp\fR\fR
  65 .ad
  66 .RS 11n
  67 a pointer to a variable into which the current A-set is to be returned
  68 .RE
  69 
  70 .sp
  71 .ne 2
  72 .na


 101 .ne 2
 102 .na
 103 \fB\fIminor\fR\fR
 104 .ad
 105 .RS 11n
 106 the \fBdevfs\fR path (the \fB/devices\fR path without the "\fB/devices\fR"
 107 prefix) of a minor which is to be the subject of a contract
 108 .RE
 109 
 110 .sp
 111 .ne 2
 112 .na
 113 \fB\fInonegp\fR\fR
 114 .ad
 115 .RS 11n
 116 a pointer to a \fIuint_t\fR variable for receiving the current setting of the
 117 "nonnegotiable" term in the template
 118 .RE
 119 
 120 .SH DESCRIPTION
 121 .sp
 122 .LP
 123 These functions read and write device contract terms and operate on device
 124 contract template file descriptors obtained from the \fBcontract\fR(4)
 125 filesystem (ctfs).
 126 .sp
 127 .LP
 128 The \fBct_dev_tmpl_set_aset()\fR and \fBct_dev_tmpl_get_aset()\fR functions
 129 write and read the "acceptable states" set (or A-set for short).  This is the
 130 set of device states guaranteed by the contract. Any departure from these
 131 states will result in the breaking of the contract and a delivery of a critical
 132 contract event to the contract holder. The A-set value is a bitset of one or
 133 more of the following device states: \fBCT_DEV_EV_ONLINE\fR,
 134 \fBCT_DEV_EV_DEGRADED\fR, and \fBCT_DEV_EV_OFFLINE\fR.
 135 .sp
 136 .LP
 137 The \fBct_dev_tmpl_set_minor()\fR and \fBct_dev_tmpl_get_minor()\fR functions
 138 write and read the minor term (the device resource that is to be the subject of
 139 the contract.) The value is a \fBdevfs\fR path to a device minor node (minus
 140 the "\fB/devices\fR" prefix). For the \fBct_dev_tmpl_get_minor()\fR function, a
 141 buffer at least \fBPATH_MAX\fR in size must be passed in. If the buffer is
 142 smaller than \fBPATH_MAX\fR, then the minimum size of the buffer required
 143 (\fBPATH_MAX\fR) for this function is passed back to the caller via the
 144 \fIbuflenp\fR argument.
 145 .sp
 146 .LP
 147 The \fBct_dev_tmpl_set_noneg()\fR and \fBct_dev_tmpl_get_noneg()\fR functions
 148 write and read the nonnegotiable term. If this term is set, synchronous
 149 negotiation events are automatically NACKed on behalf of the contract holder.
 150 For \fBct_dev_tmpl_get_noneg()\fR, the variable pointed to by \fInonegp\fR is
 151 set to 1 if the "noneg" term is set or to 0 otherwise.  The
 152 \fBct_dev_tmpl_clear_noneg()\fR term clears the nonnegotiable term from a
 153 template.
 154 .SH RETURN VALUES
 155 .sp
 156 .LP
 157 Upon successful completion, these functions return 0. Otherwise, they return a
 158 non-zero error value.
 159 .SH ERRORS
 160 .sp
 161 .LP
 162 The \fBct_dev_tmpl_set_aset()\fR function will fail if:
 163 .sp
 164 .ne 2
 165 .na
 166 \fB\fBEINVAL\fR\fR
 167 .ad
 168 .RS 10n
 169 A template file descriptor or A-set is invalid
 170 .RE
 171 
 172 .sp
 173 .LP
 174 The \fBct_dev_tmpl_set_minor()\fR function will fail if:
 175 .sp
 176 .ne 2
 177 .na
 178 \fB\fBEINVAL\fR\fR
 179 .ad
 180 .RS 10n


 225 .RE
 226 
 227 .sp
 228 .LP
 229 The \fBct_dev_tmpl_get_noneg()\fR function will fail if:
 230 .sp
 231 .ne 2
 232 .na
 233 \fB\fBEINVAL\fR\fR
 234 .ad
 235 .RS 10n
 236 One or more arguments is invalid.
 237 .RE
 238 
 239 .sp
 240 .LP
 241 The \fBct_dev_tmpl_get_minor()\fR function will fail if:
 242 .sp
 243 .ne 2
 244 .na
 245 \fB\fBEOVEFLOW\fR\fR
 246 .ad
 247 .RS 12n
 248 The supplied buffer is too small.
 249 .RE
 250 
 251 .SH ATTRIBUTES
 252 .sp
 253 .LP
 254 See \fBattributes\fR(5) for descriptions of the following attributes:
 255 .sp
 256 
 257 .sp
 258 .TS
 259 box;
 260 c | c
 261 l | l .
 262 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 263 _
 264 Interface Stability     Committed
 265 _
 266 MT-Level        Safe
 267 .TE
 268 
 269 .SH SEE ALSO
 270 .sp
 271 .LP
 272 \fBlibcontract\fR(3LIB), \fBcontract\fR(4), \fBdevices\fR(4),
 273 \fBattributes\fR(5), \fBlfcompile\fR(5)


  32 .nf
  33 \fBint\fR \fBct_dev_tmpl_get_minor\fR(\fBint\fR \fIfd\fR, \fBchar *\fR\fIbuf\fR, \fBsize_t *\fR\fIbuflenp\fR);
  34 .fi
  35 
  36 .LP
  37 .nf
  38 \fBint\fR \fBct_dev_tmpl_set_noneg\fR(\fBint\fR \fIfd\fR);
  39 .fi
  40 
  41 .LP
  42 .nf
  43 \fBint\fR \fBct_dev_tmpl_clear_noneg\fR(\fBint\fR \fIfd\fR);
  44 .fi
  45 
  46 .LP
  47 .nf
  48 \fBint\fR \fBct_dev_tmpl_get_noneg\fR(\fBint\fR \fIfd\fR, \fBuint_t *\fR\fInonegp\fR);
  49 .fi
  50 
  51 .SH PARAMETERS

  52 .ne 2
  53 .na
  54 \fB\fIaset\fR\fR
  55 .ad
  56 .RS 11n
  57 a bitset of one or more of device states
  58 .RE
  59 
  60 .sp
  61 .ne 2
  62 .na
  63 \fB\fIasetp\fR\fR
  64 .ad
  65 .RS 11n
  66 a pointer to a variable into which the current A-set is to be returned
  67 .RE
  68 
  69 .sp
  70 .ne 2
  71 .na


 100 .ne 2
 101 .na
 102 \fB\fIminor\fR\fR
 103 .ad
 104 .RS 11n
 105 the \fBdevfs\fR path (the \fB/devices\fR path without the "\fB/devices\fR"
 106 prefix) of a minor which is to be the subject of a contract
 107 .RE
 108 
 109 .sp
 110 .ne 2
 111 .na
 112 \fB\fInonegp\fR\fR
 113 .ad
 114 .RS 11n
 115 a pointer to a \fIuint_t\fR variable for receiving the current setting of the
 116 "nonnegotiable" term in the template
 117 .RE
 118 
 119 .SH DESCRIPTION

 120 .LP
 121 These functions read and write device contract terms and operate on device
 122 contract template file descriptors obtained from the \fBcontract\fR(4)
 123 filesystem (ctfs).
 124 .sp
 125 .LP
 126 The \fBct_dev_tmpl_set_aset()\fR and \fBct_dev_tmpl_get_aset()\fR functions
 127 write and read the "acceptable states" set (or A-set for short).  This is the
 128 set of device states guaranteed by the contract. Any departure from these
 129 states will result in the breaking of the contract and a delivery of a critical
 130 contract event to the contract holder. The A-set value is a bitset of one or
 131 more of the following device states: \fBCT_DEV_EV_ONLINE\fR,
 132 \fBCT_DEV_EV_DEGRADED\fR, and \fBCT_DEV_EV_OFFLINE\fR.
 133 .sp
 134 .LP
 135 The \fBct_dev_tmpl_set_minor()\fR and \fBct_dev_tmpl_get_minor()\fR functions
 136 write and read the minor term (the device resource that is to be the subject of
 137 the contract.) The value is a \fBdevfs\fR path to a device minor node (minus
 138 the "\fB/devices\fR" prefix). For the \fBct_dev_tmpl_get_minor()\fR function, a
 139 buffer at least \fBPATH_MAX\fR in size must be passed in. If the buffer is
 140 smaller than \fBPATH_MAX\fR, then the minimum size of the buffer required
 141 (\fBPATH_MAX\fR) for this function is passed back to the caller via the
 142 \fIbuflenp\fR argument.
 143 .sp
 144 .LP
 145 The \fBct_dev_tmpl_set_noneg()\fR and \fBct_dev_tmpl_get_noneg()\fR functions
 146 write and read the nonnegotiable term. If this term is set, synchronous
 147 negotiation events are automatically NACKed on behalf of the contract holder.
 148 For \fBct_dev_tmpl_get_noneg()\fR, the variable pointed to by \fInonegp\fR is
 149 set to 1 if the "noneg" term is set or to 0 otherwise.  The
 150 \fBct_dev_tmpl_clear_noneg()\fR term clears the nonnegotiable term from a
 151 template.
 152 .SH RETURN VALUES

 153 .LP
 154 Upon successful completion, these functions return 0. Otherwise, they return a
 155 non-zero error value.
 156 .SH ERRORS

 157 .LP
 158 The \fBct_dev_tmpl_set_aset()\fR function will fail if:
 159 .sp
 160 .ne 2
 161 .na
 162 \fB\fBEINVAL\fR\fR
 163 .ad
 164 .RS 10n
 165 A template file descriptor or A-set is invalid
 166 .RE
 167 
 168 .sp
 169 .LP
 170 The \fBct_dev_tmpl_set_minor()\fR function will fail if:
 171 .sp
 172 .ne 2
 173 .na
 174 \fB\fBEINVAL\fR\fR
 175 .ad
 176 .RS 10n


 221 .RE
 222 
 223 .sp
 224 .LP
 225 The \fBct_dev_tmpl_get_noneg()\fR function will fail if:
 226 .sp
 227 .ne 2
 228 .na
 229 \fB\fBEINVAL\fR\fR
 230 .ad
 231 .RS 10n
 232 One or more arguments is invalid.
 233 .RE
 234 
 235 .sp
 236 .LP
 237 The \fBct_dev_tmpl_get_minor()\fR function will fail if:
 238 .sp
 239 .ne 2
 240 .na
 241 \fB\fBEOVERFLOW\fR\fR
 242 .ad
 243 .RS 12n
 244 The supplied buffer is too small.
 245 .RE
 246 
 247 .SH ATTRIBUTES

 248 .LP
 249 See \fBattributes\fR(5) for descriptions of the following attributes:
 250 .sp
 251 
 252 .sp
 253 .TS
 254 box;
 255 c | c
 256 l | l .
 257 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 258 _
 259 Interface Stability     Committed
 260 _
 261 MT-Level        Safe
 262 .TE
 263 
 264 .SH SEE ALSO

 265 .LP
 266 \fBlibcontract\fR(3LIB), \fBcontract\fR(4), \fBdevices\fR(4),
 267 \fBattributes\fR(5), \fBlfcompile\fR(5)