ksh: build with __EXTENSIONS__ to expose confstr
[unleashed.git] / share / man / man3stmf / stmfSetLuProp.3stmf
blob3f0fc416e17f86290353b7f2fcb1397e006f4176
1 '\" te
2 .\" Copyright (c) 2009, Sun Microsystems Inc. All Rights Reserved.
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. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\"  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
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH STMFSETLUPROP 3STMF "Jul 17, 2009"
7 .SH NAME
8 stmfSetLuProp, stmfGetLuProp \- set or get a logical unit property
9 .SH SYNOPSIS
10 .LP
11 .nf
12 cc [ \fIflag\fR... ] \fIfile\fR... -lstmf [ \fIlibrary\fR... ]
13 #include <libstmf.h>
15 \fBint\fR \fBstmfSetLuProp\fR(\fBluResource\fR \fIhdl\fR, \fBuint32_t\fR \fIprop\fR, \fBconst char *\fR\fIpropVal\fR);
16 .fi
18 .LP
19 .nf
20 \fBint\fR \fBstmfGetLuProp\fR(\fBluResource\fR \fIhdl\fR, \fBuint32_t\fR \fIprop\fR, \fBchar *\fR\fIpropVal\fR,
21      \fBsize_t *\fR\fIpropLen\fR);
22 .fi
24 .SH PARAMETERS
25 .sp
26 .ne 2
27 .na
28 \fB\fIhdl\fR\fR
29 .ad
30 .RS 11n
31 A logical unit resource previously allocated by
32 \fBstmfCreateLuResource\fR(3STMF) or \fBstmfGetLuResource\fR(3STMF).
33 .RE
35 .sp
36 .ne 2
37 .na
38 \fB\fIprop\fR\fR
39 .ad
40 .RS 11n
41 A property type value. See DESCRIPTION for valid values.
42 .RE
44 .sp
45 .ne 2
46 .na
47 \fB\fIpropVal\fR\fR
48 .ad
49 .RS 11n
50 A property value.
51 .RE
53 .sp
54 .ne 2
55 .na
56 \fB\fIpropLen\fR\fR
57 .ad
58 .RS 11n
59 The length of the specified property value. If \fIpropLen\fR was of an
60 insufficient size to hold the returned property value, \fIpropLen\fR will
61 contain the required size of the buffer and \fBSTMF_ERROR_INVALID_ARG\fR will
62 be returned.
63 .RE
65 .SH DESCRIPTION
66 .sp
67 .LP
68 These functions set or get property values. All property values are expressed
69 in human-readable form. Boolean properties are expressed in case insensitive
70 form of "true" or "false". Properties that are represented by ASCII hexadecimal
71 contain no leading characters to indicate a base hexadecimal representation
72 (that is, no leading "0x"). The \fIprop\fR argument can be one of the following
73 values:
74 .sp
75 .ne 2
76 .na
77 \fB\fBSTMF_LU_PROP_ALIAS\fR\fR
78 .ad
79 .sp .6
80 .RS 4n
81 Up to 255 characters representing a user defined name for the device.
82 .sp
83 Default: Set to file name of backing store.
84 .RE
86 .sp
87 .ne 2
88 .na
89 \fB\fBSTMF_LU_PROP_BLOCK_SIZE\fR\fR
90 .ad
91 .sp .6
92 .RS 4n
93 Numeric value for block size in bytes in 2^n.
94 .sp
95 Default: 512
96 .RE
98 .sp
99 .ne 2
101 \fB\fBSTMF_LU_PROP_COMPANY_ID\fR\fR
103 .sp .6
104 .RS 4n
105 Organizational Unique Identifier. 6 hexadecimal ASCII characters representing
106 the IEEE OUI company id assignment. This will be used to generate the device
107 identifier (GUID).
109 Default: 00144F
113 .ne 2
115 \fB\fBSTMF_LU_PROP_DATA_FILENAME\fR\fR
117 .sp .6
118 .RS 4n
119 Character value representing the file name of the backing store device.
121 Default: None
125 .ne 2
127 \fB\fBSTMF_LU_PROP_GUID\fR\fR
129 .sp .6
130 .RS 4n
131 ASCII hexadecimal string of 32 characters representing the unique identifier
132 for the device. This must be of valid 32 hexadecimal ASCII characters
133 representing a valid NAA Registered Extended Identifier.
135 Default: Set by framework to a generated value.
139 .ne 2
141 \fB\fBSTMF_LU_PROP_META_FILENAME\fR\fR
143 .sp .6
144 .RS 4n
145 Metadata file name. When specified, will be used to hold the SCSI metadata for
146 the logical unit.
148 Default: None. If this value is not specified, the value specified in
149 \fBSTMF_LU_PROP_DATA_FILENAME\fR will be used.
153 .ne 2
155 \fB\fBSTMF_LU_PROP_MGMT_URL\fR\fR
157 .sp .6
158 .RS 4n
159 Up to 1024 characters representing Management Network Address URLs. More than
160 one URL can be passed using space delimited URLs.
164 .ne 2
166 \fB\fBSTMF_LU_PROP_PID\fR\fR
168 .sp .6
169 .RS 4n
170 Up to 16 characters of product identification that will be reflected in the
171 Standard INQUIRY data returned for the device.
173 Default: sSet to COMSTAR.
177 .ne 2
179 \fB\fBSTMF_LU_PROP_PRODUCT_REV\fR\fR
181 .sp .6
182 .RS 4n
183 Up to 4 characters of revision information that will be reflected in the
184 Standard INQUIRY data returned for the device.
186 Default: Set to 1.0.
190 .ne 2
192 \fB\fBSTMF_LU_PROP_SERIAL_NUM\fR\fR
194 .sp .6
195 .RS 4n
196 Serial Number. Specifies the SCSI Vital Product Data Serial Number (page 80h).
197 It is a character value up to 252 bytes in length.
199 Default: None
203 .ne 2
205 \fB\fBSTMF_LU_PROP_SIZE\fR\fR
207 .sp .6
208 .RS 4n
209 Numeric value w/optional suffix, e.g. 100G, 1T, to specify unit of size.
211 Default: Size of the device specified in the \fBSTMF_LU_PROP_DATA_FILENAME\fR
212 property value.
216 .ne 2
218 \fB\fBSTMF_LU_PROP_VID\fR\fR
220 .sp .6
221 .RS 4n
222 8 characters of vendor identification per SCSI SPC-3 and will be reflected in
223 the Standard INQUIRY data returned for the device.
225 Default: Set to SUN.
229 .ne 2
231 \fB\fBSTMF_LU_PROP_WRITE_CACHE_DISABLE\fR\fR
233 .sp .6
234 .RS 4n
235 Write back cache disable. When specified as "true" or "false", specifies write
236 back cache disable behavior.
238 Default: Writeback cache setting of the backing store device specified by
239 \fBSTMF_LU_PROP_DATA_FILENAME\fR.
243 .ne 2
245 \fB\fBSTMF_LU_PROP_WRITE_PROTECT\fR\fR
247 .sp .6
248 .RS 4n
249 Write protect bit. When specified as "true" or "false", specifies whether the
250 device behaves as a write protected device.
252 Default: "false"
255 .SH RETURN VALUES
258 The following values are returned:
260 .ne 2
262 \fB\fBSTMF_STATUS_SUCCESS\fR\fR
264 .sp .6
265 .RS 4n
266 The API call was successful.
270 .ne 2
272 \fB\fBSTMF_ERROR_INVALID_ARG\fR\fR
274 .sp .6
275 .RS 4n
276 Either \fIprop\fR or \fIpropVal\fR is unrecognized.
280 .ne 2
282 \fB\fBSTMF_ERROR_INVALID_PROPSIZE\fR\fR
284 .sp .6
285 .RS 4n
286 The size of \fIpropVal\fR is invalid.
290 .ne 2
292 \fB\fBSTMF_ERROR_NO_PROP\fR\fR
294 .sp .6
295 .RS 4n
296 The value of \fIprop\fR is unknown for this resource type.
299 .SH ATTRIBUTES
302 See \fBattributes\fR(5) for descriptions of the following attributes:
307 box;
308 c | c
309 l | l .
310 ATTRIBUTE TYPE  ATTRIBUTE VALUE
312 Interface Stability     Committed
314 MT-Level        Safe
317 .SH SEE ALSO
320 \fBlibstmf\fR(3LIB), \fBstmfCreateLuResource\fR(3STMF),
321 \fBstmfGetLuResource\fR(3STMF), \fBattributes\fR(5)