Root/
Source at commit 1548 created 12 years 10 months ago. By blackosx, Added detection for FAT format created by Lion's Disk Utility. Enhanced install log. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2004-2009 Apple Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
6 | * This file contains Original Code and/or Modifications of Original Code␊ |
7 | * as defined in and that are subject to the Apple Public Source License␊ |
8 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
9 | * compliance with the License. Please obtain a copy of the License at␊ |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
11 | * file.␊ |
12 | * ␊ |
13 | * The Original Code and all software distributed under the License are␊ |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
18 | * Please see the License for the specific language governing rights and␊ |
19 | * limitations under the License.␊ |
20 | * ␊ |
21 | * @APPLE_LICENSE_HEADER_END@␊ |
22 | */␊ |
23 | ␊ |
24 | #ifndef _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_␊ |
25 | #define _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_␊ |
26 | ␊ |
27 | ␊ |
28 | #if KERNEL␊ |
29 | #include <IOKit/IOTypes.h>␊ |
30 | #else␊ |
31 | #include <CoreFoundation/CoreFoundation.h>␊ |
32 | #endif␊ |
33 | ␊ |
34 | ␊ |
35 | /*! @header SCSI Request Sense Definitions␊ |
36 | ␉@discussion␊ |
37 | ␉This file contains all definitions for the data returned from␊ |
38 | ␉the REPORT_LUNS (0xA0) command.␊ |
39 | */␊ |
40 | ␊ |
41 | ␊ |
42 | /*!␊ |
43 | @struct SCSICmd_REPORT_LUNS_LUN_ENTRY␊ |
44 | @discussion␊ |
45 | This structure represents a single LUN entry in a LUN list␊ |
46 | returned via the REPORT_LUNS command.␊ |
47 | */␊ |
48 | typedef struct SCSICmd_REPORT_LUNS_LUN_ENTRY␊ |
49 | {␊ |
50 | ␉UInt16␉␉FIRST_LEVEL_ADDRESSING;␊ |
51 | ␉UInt16␉␉SECOND_LEVEL_ADDRESSING;␊ |
52 | ␉UInt16␉␉THIRD_LEVEL_ADDRESSING;␊ |
53 | ␉UInt16␉␉FOURTH_LEVEL_ADDRESSING;␊ |
54 | } SCSICmd_REPORT_LUNS_LUN_ENTRY;␊ |
55 | ␊ |
56 | ␊ |
57 | /*!␊ |
58 | @constant kREPORT_LUNS_HeaderSize␊ |
59 | @discussion␊ |
60 | Size of the REPORT_LUNS header as defined in the SPC-3 specification.␊ |
61 | */␊ |
62 | #define kREPORT_LUNS_HeaderSize␉␉8␊ |
63 | ␊ |
64 | /*!␊ |
65 | @enum REPORT_LUNS addressing methods.␊ |
66 | @discussion␊ |
67 | REPORT_LUNS addressing methods described in␊ |
68 | SAM-2 documents.␊ |
69 | @constant kREPORT_LUNS_ADDRESS_METHOD_PERIPHERAL_DEVICE␊ |
70 | Peripheral Device Addressing Method.␊ |
71 | @constant kREPORT_LUNS_ADDRESS_DEVICE_TYPE_SPECIFIC␊ |
72 | Device Type Specific Addressing Method.␊ |
73 | @constant kREPORT_LUNS_ADDRESS_METHOD_LOGICAL_UNIT␊ |
74 | Logical Unit Specific Addressing Method.␊ |
75 | @constant kREPORT_LUNS_ADDRESS_METHOD_OFFSET␊ |
76 | Offset to the address method data.␊ |
77 | */␊ |
78 | enum␊ |
79 | {␊ |
80 | ␉kREPORT_LUNS_ADDRESS_METHOD_PERIPHERAL_DEVICE␉= 0,␊ |
81 | ␉kREPORT_LUNS_ADDRESS_DEVICE_TYPE_SPECIFIC␉␉= 1,␊ |
82 | ␉kREPORT_LUNS_ADDRESS_METHOD_LOGICAL_UNIT ␉␉= 2,␊ |
83 | ␉// Reserved [3]␊ |
84 | ␉kREPORT_LUNS_ADDRESS_METHOD_OFFSET␉␉␉␉= 14␊ |
85 | };␊ |
86 | ␊ |
87 | ␊ |
88 | /*!␊ |
89 | @struct REPORT_LUNS_LOGICAL_UNIT_ADDRESSING␊ |
90 | @discussion␊ |
91 | This structure represents a LUN Addressing scheme.␊ |
92 | */␊ |
93 | typedef struct REPORT_LUNS_LOGICAL_UNIT_ADDRESSING␊ |
94 | {␊ |
95 | #ifdef __LITTLE_ENDIAN__␊ |
96 | ␉UInt16␉␉LUN␉␉␉: 5;␊ |
97 | ␉UInt16␉␉BUS_NUMBER␉: 3;␊ |
98 | ␉UInt16␉␉TARGET␉␉: 6;␊ |
99 | ␉UInt16␉␉reserved2␉: 1;␊ |
100 | ␉UInt16␉␉reserved␉: 1;␊ |
101 | #else /* !__LITTLE_ENDIAN__ */␊ |
102 | ␉UInt16␉␉reserved␉: 1;␊ |
103 | ␉UInt16␉␉reserved2␉: 1;␊ |
104 | ␉UInt16␉␉TARGET␉␉: 6;␊ |
105 | ␉UInt16␉␉BUS_NUMBER␉: 3;␊ |
106 | ␉UInt16␉␉LUN␉␉␉: 5;␊ |
107 | #endif /* !__LITTLE_ENDIAN__ */␊ |
108 | } REPORT_LUNS_LOGICAL_UNIT_ADDRESSING;␊ |
109 | ␊ |
110 | ␊ |
111 | /*!␊ |
112 | @struct REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING␊ |
113 | @discussion␊ |
114 | This structure represents a Peripheral Device Addressing scheme.␊ |
115 | */␊ |
116 | typedef struct REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING␊ |
117 | {␊ |
118 | #ifdef __LITTLE_ENDIAN__␊ |
119 | ␉UInt16␉␉TARGET_LUN␉␉: 8;␊ |
120 | ␉UInt16␉␉BUS_IDENTIFIER␉: 6;␊ |
121 | ␉UInt16␉␉reserved2␉␉: 1;␊ |
122 | ␉UInt16␉␉reserved␉␉: 1;␊ |
123 | #else /* !__LITTLE_ENDIAN__ */␊ |
124 | ␉UInt16␉␉reserved␉␉: 1;␊ |
125 | ␉UInt16␉␉reserved2␉␉: 1;␊ |
126 | ␉UInt16␉␉BUS_IDENTIFIER␉: 6;␊ |
127 | ␉UInt16␉␉TARGET_LUN␉␉: 8;␊ |
128 | #endif /* !__LITTLE_ENDIAN__ */␊ |
129 | } REPORT_LUNS_PERIPHERAL_DEVICE_ADDRESSING;␊ |
130 | ␊ |
131 | ␊ |
132 | /*!␊ |
133 | @struct SCSICmd_REPORT_LUNS_Header␊ |
134 | @discussion␊ |
135 | This structure defines the format of the data that is returned for␊ |
136 | the REPORT_LUNS command.␊ |
137 | */␊ |
138 | typedef struct SCSICmd_REPORT_LUNS_Header␊ |
139 | {␊ |
140 | ␉UInt32␉␉␉␉␉␉␉LUN_LIST_LENGTH;␉// LUN list length in bytes.␊ |
141 | ␉UInt32␉␉␉␉␉␉␉RESERVED;␊ |
142 | ␉SCSICmd_REPORT_LUNS_LUN_ENTRY␉LUN[1];␉␉␉␉// Variable length list. Must have at least LUN 0 if␊ |
143 | } SCSICmd_REPORT_LUNS_Header;␉␉␉␉␉␉␉// Target supports REPORT_LUNS command.␊ |
144 | ␊ |
145 | ␊ |
146 | #endif␉/* _IOKIT_SCSI_CMDS_REPORT_LUNS_DEFINITIONS_H_ */␊ |
147 |