1stmfSetLuProp(3STMSFC)SI Target Mode Framework Library FunctiosntsmfSetLuProp(3STMF)
2
3
4

NAME

6       stmfSetLuProp, stmfGetLuProp - set or get a logical unit property
7

SYNOPSIS

9       cc [ flag... ] file... -lstmf [ library... ]
10       #include <libstmf.h>
11
12       int stmfSetLuProp(luResource hdl, uint32_t prop, const char *propVal);
13
14
15       int stmfGetLuProp(luResource hdl, uint32_t prop, char *propVal,
16            size_t *propLen);
17
18

PARAMETERS

20       hdl        A  logical  unit  resource  previously allocated by stmfCre‐
21                  ateLuResource(3STMF) or stmfGetLuResource(3STMF).
22
23
24       prop       A property type value. See DESCRIPTION for valid values.
25
26
27       propVal    A property value.
28
29
30       propLen    The length of the specified property value. If  propLen  was
31                  of an insufficient size to hold the returned property value,
32                  propLen will contain the required size  of  the  buffer  and
33                  STMF_ERROR_INVALID_ARG will be returned.
34
35

DESCRIPTION

37       These  functions  set  or  get property values. All property values are
38       expressed in human-readable form. Boolean properties are  expressed  in
39       case  insensitive form of "true" or "false". Properties that are repre‐
40       sented by ASCII hexadecimal contain no leading characters to indicate a
41       base  hexadecimal  representation  (that is, no leading "0x"). The prop
42       argument can be one of the following values:
43
44       STMF_LU_PROP_ALIAS
45
46           Up to 255 characters representing  a  user  defined  name  for  the
47           device.
48
49           Default: Set to file name of backing store.
50
51
52       STMF_LU_PROP_BLOCK_SIZE
53
54           Numeric value for block size in bytes in 2^n.
55
56           Default: 512
57
58
59       STMF_LU_PROP_COMPANY_ID
60
61           Organizational  Unique  Identifier.  6 hexadecimal ASCII characters
62           representing the IEEE OUI company id assignment. This will be  used
63           to generate the device identifier (GUID).
64
65           Default: 00144F
66
67
68       STMF_LU_PROP_DATA_FILENAME
69
70           Character  value  representing  the  file name of the backing store
71           device.
72
73           Default: None
74
75
76       STMF_LU_PROP_GUID
77
78           ASCII hexadecimal string of 32 characters representing  the  unique
79           identifier  for  the  device.  This must be of valid 32 hexadecimal
80           ASCII characters representing a valid NAA Registered Extended Iden‐
81           tifier.
82
83           Default: Set by framework to a generated value.
84
85
86       STMF_LU_PROP_META_FILENAME
87
88           Metadata  file  name. When specified, will be used to hold the SCSI
89           metadata for the logical unit.
90
91           Default: None. If this value is not specified, the value  specified
92           in STMF_LU_PROP_DATA_FILENAME will be used.
93
94
95       STMF_LU_PROP_MGMT_URL
96
97           Up to 1024 characters representing Management Network Address URLs.
98           More than one URL can be passed using space delimited URLs.
99
100
101       STMF_LU_PROP_PID
102
103           Up  to  16  characters  of  product  identification  that  will  be
104           reflected in the Standard INQUIRY data returned for the device.
105
106           Default: sSet to COMSTAR.
107
108
109       STMF_LU_PROP_PRODUCT_REV
110
111           Up  to  4 characters of revision information that will be reflected
112           in the Standard INQUIRY data returned for the device.
113
114           Default: Set to 1.0.
115
116
117       STMF_LU_PROP_SERIAL_NUM
118
119           Serial Number. Specifies the SCSI Vital Product Data Serial  Number
120           (page 80h). It is a character value up to 252 bytes in length.
121
122           Default: None
123
124
125       STMF_LU_PROP_SIZE
126
127           Numeric  value w/optional suffix, e.g. 100G, 1T, to specify unit of
128           size.
129
130           Default:    Size    of    the    device    specified     in     the
131           STMF_LU_PROP_DATA_FILENAME property value.
132
133
134       STMF_LU_PROP_VID
135
136           8  characters  of  vendor identification per SCSI SPC-3 and will be
137           reflected in the Standard INQUIRY data returned for the device.
138
139           Default: Set to SUN.
140
141
142       STMF_LU_PROP_WRITE_CACHE_DISABLE
143
144           Write back cache disable. When  specified  as  "true"  or  "false",
145           specifies write back cache disable behavior.
146
147           Default: Writeback cache setting of the backing store device speci‐
148           fied by STMF_LU_PROP_DATA_FILENAME.
149
150
151       STMF_LU_PROP_WRITE_PROTECT
152
153           Write protect bit. When specified as "true" or  "false",  specifies
154           whether the device behaves as a write protected device.
155
156           Default: "false"
157
158

RETURN VALUES

160       The following values are returned:
161
162       STMF_STATUS_SUCCESS
163
164           The API call was successful.
165
166
167       STMF_ERROR_INVALID_ARG
168
169           Either prop or propVal is unrecognized.
170
171
172       STMF_ERROR_INVALID_PROPSIZE
173
174           The size of propVal is invalid.
175
176
177       STMF_ERROR_NO_PROP
178
179           The value of prop is unknown for this resource type.
180
181

ATTRIBUTES

183       See attributes(5) for descriptions of the following attributes:
184
185
186
187
188       ┌─────────────────────────────┬─────────────────────────────┐
189       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
190       ├─────────────────────────────┼─────────────────────────────┤
191       │Interface Stability          │Committed                    │
192       ├─────────────────────────────┼─────────────────────────────┤
193       │MT-Level                     │Safe                         │
194       └─────────────────────────────┴─────────────────────────────┘
195

SEE ALSO

197       libstmf(3LIB),  stmfCreateLuResource(3STMF),  stmfGetLuResource(3STMF),
198       attributes(5)
199
200
201
202SunOS 5.11                        17 Jul 2009             stmfSetLuProp(3STMF)
Impressum