diff options
Diffstat (limited to 'fs/udf/ecma_167.h')
-rw-r--r-- | fs/udf/ecma_167.h | 875 |
1 files changed, 410 insertions, 465 deletions
diff --git a/fs/udf/ecma_167.h b/fs/udf/ecma_167.h index f81f2ebbf508..294ce2daa03a 100644 --- a/fs/udf/ecma_167.h +++ b/fs/udf/ecma_167.h | |||
@@ -38,10 +38,9 @@ | |||
38 | #define _ECMA_167_H 1 | 38 | #define _ECMA_167_H 1 |
39 | 39 | ||
40 | /* Character set specification (ECMA 167r3 1/7.2.1) */ | 40 | /* Character set specification (ECMA 167r3 1/7.2.1) */ |
41 | typedef struct | 41 | typedef struct { |
42 | { | 42 | uint8_t charSetType; |
43 | uint8_t charSetType; | 43 | uint8_t charSetInfo[63]; |
44 | uint8_t charSetInfo[63]; | ||
45 | } __attribute__ ((packed)) charspec; | 44 | } __attribute__ ((packed)) charspec; |
46 | 45 | ||
47 | /* Character Set Type (ECMA 167r3 1/7.2.1.1) */ | 46 | /* Character Set Type (ECMA 167r3 1/7.2.1.1) */ |
@@ -55,35 +54,33 @@ typedef struct | |||
55 | #define CHARSPEC_TYPE_CS7 0x07 /* (1/7.2.9) */ | 54 | #define CHARSPEC_TYPE_CS7 0x07 /* (1/7.2.9) */ |
56 | #define CHARSPEC_TYPE_CS8 0x08 /* (1/7.2.10) */ | 55 | #define CHARSPEC_TYPE_CS8 0x08 /* (1/7.2.10) */ |
57 | 56 | ||
58 | typedef uint8_t dstring; | 57 | typedef uint8_t dstring; |
59 | 58 | ||
60 | /* Timestamp (ECMA 167r3 1/7.3) */ | 59 | /* Timestamp (ECMA 167r3 1/7.3) */ |
61 | typedef struct | 60 | typedef struct { |
62 | { | 61 | __le16 typeAndTimezone; |
63 | __le16 typeAndTimezone; | 62 | __le16 year; |
64 | __le16 year; | 63 | uint8_t month; |
65 | uint8_t month; | 64 | uint8_t day; |
66 | uint8_t day; | 65 | uint8_t hour; |
67 | uint8_t hour; | 66 | uint8_t minute; |
68 | uint8_t minute; | 67 | uint8_t second; |
69 | uint8_t second; | 68 | uint8_t centiseconds; |
70 | uint8_t centiseconds; | 69 | uint8_t hundredsOfMicroseconds; |
71 | uint8_t hundredsOfMicroseconds; | 70 | uint8_t microseconds; |
72 | uint8_t microseconds; | ||
73 | } __attribute__ ((packed)) timestamp; | 71 | } __attribute__ ((packed)) timestamp; |
74 | 72 | ||
75 | typedef struct | 73 | typedef struct { |
76 | { | 74 | uint16_t typeAndTimezone; |
77 | uint16_t typeAndTimezone; | 75 | int16_t year; |
78 | int16_t year; | 76 | uint8_t month; |
79 | uint8_t month; | 77 | uint8_t day; |
80 | uint8_t day; | 78 | uint8_t hour; |
81 | uint8_t hour; | 79 | uint8_t minute; |
82 | uint8_t minute; | 80 | uint8_t second; |
83 | uint8_t second; | 81 | uint8_t centiseconds; |
84 | uint8_t centiseconds; | 82 | uint8_t hundredsOfMicroseconds; |
85 | uint8_t hundredsOfMicroseconds; | 83 | uint8_t microseconds; |
86 | uint8_t microseconds; | ||
87 | } __attribute__ ((packed)) kernel_timestamp; | 84 | } __attribute__ ((packed)) kernel_timestamp; |
88 | 85 | ||
89 | /* Type and Time Zone (ECMA 167r3 1/7.3.1) */ | 86 | /* Type and Time Zone (ECMA 167r3 1/7.3.1) */ |
@@ -94,11 +91,10 @@ typedef struct | |||
94 | #define TIMESTAMP_TIMEZONE_MASK 0x0FFF | 91 | #define TIMESTAMP_TIMEZONE_MASK 0x0FFF |
95 | 92 | ||
96 | /* Entity identifier (ECMA 167r3 1/7.4) */ | 93 | /* Entity identifier (ECMA 167r3 1/7.4) */ |
97 | typedef struct | 94 | typedef struct { |
98 | { | 95 | uint8_t flags; |
99 | uint8_t flags; | 96 | uint8_t ident[23]; |
100 | uint8_t ident[23]; | 97 | uint8_t identSuffix[8]; |
101 | uint8_t identSuffix[8]; | ||
102 | } __attribute__ ((packed)) regid; | 98 | } __attribute__ ((packed)) regid; |
103 | 99 | ||
104 | /* Flags (ECMA 167r3 1/7.4.1) */ | 100 | /* Flags (ECMA 167r3 1/7.4.1) */ |
@@ -107,12 +103,11 @@ typedef struct | |||
107 | 103 | ||
108 | /* Volume Structure Descriptor (ECMA 167r3 2/9.1) */ | 104 | /* Volume Structure Descriptor (ECMA 167r3 2/9.1) */ |
109 | #define VSD_STD_ID_LEN 5 | 105 | #define VSD_STD_ID_LEN 5 |
110 | struct volStructDesc | 106 | struct volStructDesc { |
111 | { | 107 | uint8_t structType; |
112 | uint8_t structType; | 108 | uint8_t stdIdent[VSD_STD_ID_LEN]; |
113 | uint8_t stdIdent[VSD_STD_ID_LEN]; | 109 | uint8_t structVersion; |
114 | uint8_t structVersion; | 110 | uint8_t structData[2041]; |
115 | uint8_t structData[2041]; | ||
116 | } __attribute__ ((packed)); | 111 | } __attribute__ ((packed)); |
117 | 112 | ||
118 | /* Standard Identifier (EMCA 167r2 2/9.1.2) */ | 113 | /* Standard Identifier (EMCA 167r2 2/9.1.2) */ |
@@ -127,69 +122,63 @@ struct volStructDesc | |||
127 | #define VSD_STD_ID_TEA01 "TEA01" /* (2/9.3) */ | 122 | #define VSD_STD_ID_TEA01 "TEA01" /* (2/9.3) */ |
128 | 123 | ||
129 | /* Beginning Extended Area Descriptor (ECMA 167r3 2/9.2) */ | 124 | /* Beginning Extended Area Descriptor (ECMA 167r3 2/9.2) */ |
130 | struct beginningExtendedAreaDesc | 125 | struct beginningExtendedAreaDesc { |
131 | { | 126 | uint8_t structType; |
132 | uint8_t structType; | 127 | uint8_t stdIdent[VSD_STD_ID_LEN]; |
133 | uint8_t stdIdent[VSD_STD_ID_LEN]; | 128 | uint8_t structVersion; |
134 | uint8_t structVersion; | 129 | uint8_t structData[2041]; |
135 | uint8_t structData[2041]; | ||
136 | } __attribute__ ((packed)); | 130 | } __attribute__ ((packed)); |
137 | 131 | ||
138 | /* Terminating Extended Area Descriptor (ECMA 167r3 2/9.3) */ | 132 | /* Terminating Extended Area Descriptor (ECMA 167r3 2/9.3) */ |
139 | struct terminatingExtendedAreaDesc | 133 | struct terminatingExtendedAreaDesc { |
140 | { | 134 | uint8_t structType; |
141 | uint8_t structType; | 135 | uint8_t stdIdent[VSD_STD_ID_LEN]; |
142 | uint8_t stdIdent[VSD_STD_ID_LEN]; | 136 | uint8_t structVersion; |
143 | uint8_t structVersion; | 137 | uint8_t structData[2041]; |
144 | uint8_t structData[2041]; | ||
145 | } __attribute__ ((packed)); | 138 | } __attribute__ ((packed)); |
146 | 139 | ||
147 | /* Boot Descriptor (ECMA 167r3 2/9.4) */ | 140 | /* Boot Descriptor (ECMA 167r3 2/9.4) */ |
148 | struct bootDesc | 141 | struct bootDesc { |
149 | { | 142 | uint8_t structType; |
150 | uint8_t structType; | 143 | uint8_t stdIdent[VSD_STD_ID_LEN]; |
151 | uint8_t stdIdent[VSD_STD_ID_LEN]; | 144 | uint8_t structVersion; |
152 | uint8_t structVersion; | 145 | uint8_t reserved1; |
153 | uint8_t reserved1; | 146 | regid archType; |
154 | regid archType; | 147 | regid bootIdent; |
155 | regid bootIdent; | 148 | __le32 bootExtLocation; |
156 | __le32 bootExtLocation; | 149 | __le32 bootExtLength; |
157 | __le32 bootExtLength; | 150 | __le64 loadAddress; |
158 | __le64 loadAddress; | 151 | __le64 startAddress; |
159 | __le64 startAddress; | 152 | timestamp descCreationDateAndTime; |
160 | timestamp descCreationDateAndTime; | 153 | __le16 flags; |
161 | __le16 flags; | 154 | uint8_t reserved2[32]; |
162 | uint8_t reserved2[32]; | 155 | uint8_t bootUse[1906]; |
163 | uint8_t bootUse[1906]; | ||
164 | } __attribute__ ((packed)); | 156 | } __attribute__ ((packed)); |
165 | 157 | ||
166 | /* Flags (ECMA 167r3 2/9.4.12) */ | 158 | /* Flags (ECMA 167r3 2/9.4.12) */ |
167 | #define BOOT_FLAGS_ERASE 0x01 | 159 | #define BOOT_FLAGS_ERASE 0x01 |
168 | 160 | ||
169 | /* Extent Descriptor (ECMA 167r3 3/7.1) */ | 161 | /* Extent Descriptor (ECMA 167r3 3/7.1) */ |
170 | typedef struct | 162 | typedef struct { |
171 | { | 163 | __le32 extLength; |
172 | __le32 extLength; | 164 | __le32 extLocation; |
173 | __le32 extLocation; | ||
174 | } __attribute__ ((packed)) extent_ad; | 165 | } __attribute__ ((packed)) extent_ad; |
175 | 166 | ||
176 | typedef struct | 167 | typedef struct { |
177 | { | 168 | uint32_t extLength; |
178 | uint32_t extLength; | 169 | uint32_t extLocation; |
179 | uint32_t extLocation; | ||
180 | } kernel_extent_ad; | 170 | } kernel_extent_ad; |
181 | 171 | ||
182 | /* Descriptor Tag (ECMA 167r3 3/7.2) */ | 172 | /* Descriptor Tag (ECMA 167r3 3/7.2) */ |
183 | typedef struct | 173 | typedef struct { |
184 | { | 174 | __le16 tagIdent; |
185 | __le16 tagIdent; | 175 | __le16 descVersion; |
186 | __le16 descVersion; | 176 | uint8_t tagChecksum; |
187 | uint8_t tagChecksum; | 177 | uint8_t reserved; |
188 | uint8_t reserved; | 178 | __le16 tagSerialNum; |
189 | __le16 tagSerialNum; | 179 | __le16 descCRC; |
190 | __le16 descCRC; | 180 | __le16 descCRCLength; |
191 | __le16 descCRCLength; | 181 | __le32 tagLocation; |
192 | __le32 tagLocation; | ||
193 | } __attribute__ ((packed)) tag; | 182 | } __attribute__ ((packed)) tag; |
194 | 183 | ||
195 | /* Tag Identifier (ECMA 167r3 3/7.2.1) */ | 184 | /* Tag Identifier (ECMA 167r3 3/7.2.1) */ |
@@ -204,87 +193,81 @@ typedef struct | |||
204 | #define TAG_IDENT_LVID 0x0009 | 193 | #define TAG_IDENT_LVID 0x0009 |
205 | 194 | ||
206 | /* NSR Descriptor (ECMA 167r3 3/9.1) */ | 195 | /* NSR Descriptor (ECMA 167r3 3/9.1) */ |
207 | struct NSRDesc | 196 | struct NSRDesc { |
208 | { | 197 | uint8_t structType; |
209 | uint8_t structType; | 198 | uint8_t stdIdent[VSD_STD_ID_LEN]; |
210 | uint8_t stdIdent[VSD_STD_ID_LEN]; | 199 | uint8_t structVersion; |
211 | uint8_t structVersion; | 200 | uint8_t reserved; |
212 | uint8_t reserved; | 201 | uint8_t structData[2040]; |
213 | uint8_t structData[2040]; | 202 | } __attribute__ ((packed)); |
214 | } __attribute__ ((packed)); | 203 | |
215 | |||
216 | /* Primary Volume Descriptor (ECMA 167r3 3/10.1) */ | 204 | /* Primary Volume Descriptor (ECMA 167r3 3/10.1) */ |
217 | struct primaryVolDesc | 205 | struct primaryVolDesc { |
218 | { | 206 | tag descTag; |
219 | tag descTag; | 207 | __le32 volDescSeqNum; |
220 | __le32 volDescSeqNum; | 208 | __le32 primaryVolDescNum; |
221 | __le32 primaryVolDescNum; | 209 | dstring volIdent[32]; |
222 | dstring volIdent[32]; | 210 | __le16 volSeqNum; |
223 | __le16 volSeqNum; | 211 | __le16 maxVolSeqNum; |
224 | __le16 maxVolSeqNum; | 212 | __le16 interchangeLvl; |
225 | __le16 interchangeLvl; | 213 | __le16 maxInterchangeLvl; |
226 | __le16 maxInterchangeLvl; | 214 | __le32 charSetList; |
227 | __le32 charSetList; | 215 | __le32 maxCharSetList; |
228 | __le32 maxCharSetList; | 216 | dstring volSetIdent[128]; |
229 | dstring volSetIdent[128]; | 217 | charspec descCharSet; |
230 | charspec descCharSet; | 218 | charspec explanatoryCharSet; |
231 | charspec explanatoryCharSet; | 219 | extent_ad volAbstract; |
232 | extent_ad volAbstract; | 220 | extent_ad volCopyright; |
233 | extent_ad volCopyright; | 221 | regid appIdent; |
234 | regid appIdent; | 222 | timestamp recordingDateAndTime; |
235 | timestamp recordingDateAndTime; | 223 | regid impIdent; |
236 | regid impIdent; | 224 | uint8_t impUse[64]; |
237 | uint8_t impUse[64]; | 225 | __le32 predecessorVolDescSeqLocation; |
238 | __le32 predecessorVolDescSeqLocation; | 226 | __le16 flags; |
239 | __le16 flags; | 227 | uint8_t reserved[22]; |
240 | uint8_t reserved[22]; | ||
241 | } __attribute__ ((packed)); | 228 | } __attribute__ ((packed)); |
242 | 229 | ||
243 | /* Flags (ECMA 167r3 3/10.1.21) */ | 230 | /* Flags (ECMA 167r3 3/10.1.21) */ |
244 | #define PVD_FLAGS_VSID_COMMON 0x0001 | 231 | #define PVD_FLAGS_VSID_COMMON 0x0001 |
245 | 232 | ||
246 | /* Anchor Volume Descriptor Pointer (ECMA 167r3 3/10.2) */ | 233 | /* Anchor Volume Descriptor Pointer (ECMA 167r3 3/10.2) */ |
247 | struct anchorVolDescPtr | 234 | struct anchorVolDescPtr { |
248 | { | 235 | tag descTag; |
249 | tag descTag; | 236 | extent_ad mainVolDescSeqExt; |
250 | extent_ad mainVolDescSeqExt; | 237 | extent_ad reserveVolDescSeqExt; |
251 | extent_ad reserveVolDescSeqExt; | 238 | uint8_t reserved[480]; |
252 | uint8_t reserved[480]; | ||
253 | } __attribute__ ((packed)); | 239 | } __attribute__ ((packed)); |
254 | 240 | ||
255 | /* Volume Descriptor Pointer (ECMA 167r3 3/10.3) */ | 241 | /* Volume Descriptor Pointer (ECMA 167r3 3/10.3) */ |
256 | struct volDescPtr | 242 | struct volDescPtr { |
257 | { | 243 | tag descTag; |
258 | tag descTag; | 244 | __le32 volDescSeqNum; |
259 | __le32 volDescSeqNum; | 245 | extent_ad nextVolDescSeqExt; |
260 | extent_ad nextVolDescSeqExt; | 246 | uint8_t reserved[484]; |
261 | uint8_t reserved[484]; | ||
262 | } __attribute__ ((packed)); | 247 | } __attribute__ ((packed)); |
263 | 248 | ||
264 | /* Implementation Use Volume Descriptor (ECMA 167r3 3/10.4) */ | 249 | /* Implementation Use Volume Descriptor (ECMA 167r3 3/10.4) */ |
265 | struct impUseVolDesc | 250 | struct impUseVolDesc { |
266 | { | 251 | tag descTag; |
267 | tag descTag; | 252 | __le32 volDescSeqNum; |
268 | __le32 volDescSeqNum; | 253 | regid impIdent; |
269 | regid impIdent; | 254 | uint8_t impUse[460]; |
270 | uint8_t impUse[460]; | ||
271 | } __attribute__ ((packed)); | 255 | } __attribute__ ((packed)); |
272 | 256 | ||
273 | /* Partition Descriptor (ECMA 167r3 3/10.5) */ | 257 | /* Partition Descriptor (ECMA 167r3 3/10.5) */ |
274 | struct partitionDesc | 258 | struct partitionDesc { |
275 | { | 259 | tag descTag; |
276 | tag descTag; | 260 | __le32 volDescSeqNum; |
277 | __le32 volDescSeqNum; | 261 | __le16 partitionFlags; |
278 | __le16 partitionFlags; | 262 | __le16 partitionNumber; |
279 | __le16 partitionNumber; | 263 | regid partitionContents; |
280 | regid partitionContents; | 264 | uint8_t partitionContentsUse[128]; |
281 | uint8_t partitionContentsUse[128]; | 265 | __le32 accessType; |
282 | __le32 accessType; | 266 | __le32 partitionStartingLocation; |
283 | __le32 partitionStartingLocation; | 267 | __le32 partitionLength; |
284 | __le32 partitionLength; | 268 | regid impIdent; |
285 | regid impIdent; | 269 | uint8_t impUse[128]; |
286 | uint8_t impUse[128]; | 270 | uint8_t reserved[156]; |
287 | uint8_t reserved[156]; | ||
288 | } __attribute__ ((packed)); | 271 | } __attribute__ ((packed)); |
289 | 272 | ||
290 | /* Partition Flags (ECMA 167r3 3/10.5.3) */ | 273 | /* Partition Flags (ECMA 167r3 3/10.5.3) */ |
@@ -307,29 +290,27 @@ struct partitionDesc | |||
307 | #define PD_ACCESS_TYPE_OVERWRITABLE 0x00000004 | 290 | #define PD_ACCESS_TYPE_OVERWRITABLE 0x00000004 |
308 | 291 | ||
309 | /* Logical Volume Descriptor (ECMA 167r3 3/10.6) */ | 292 | /* Logical Volume Descriptor (ECMA 167r3 3/10.6) */ |
310 | struct logicalVolDesc | 293 | struct logicalVolDesc { |
311 | { | 294 | tag descTag; |
312 | tag descTag; | 295 | __le32 volDescSeqNum; |
313 | __le32 volDescSeqNum; | 296 | charspec descCharSet; |
314 | charspec descCharSet; | 297 | dstring logicalVolIdent[128]; |
315 | dstring logicalVolIdent[128]; | 298 | __le32 logicalBlockSize; |
316 | __le32 logicalBlockSize; | 299 | regid domainIdent; |
317 | regid domainIdent; | 300 | uint8_t logicalVolContentsUse[16]; |
318 | uint8_t logicalVolContentsUse[16]; | 301 | __le32 mapTableLength; |
319 | __le32 mapTableLength; | 302 | __le32 numPartitionMaps; |
320 | __le32 numPartitionMaps; | 303 | regid impIdent; |
321 | regid impIdent; | 304 | uint8_t impUse[128]; |
322 | uint8_t impUse[128]; | 305 | extent_ad integritySeqExt; |
323 | extent_ad integritySeqExt; | 306 | uint8_t partitionMaps[0]; |
324 | uint8_t partitionMaps[0]; | ||
325 | } __attribute__ ((packed)); | 307 | } __attribute__ ((packed)); |
326 | 308 | ||
327 | /* Generic Partition Map (ECMA 167r3 3/10.7.1) */ | 309 | /* Generic Partition Map (ECMA 167r3 3/10.7.1) */ |
328 | struct genericPartitionMap | 310 | struct genericPartitionMap { |
329 | { | 311 | uint8_t partitionMapType; |
330 | uint8_t partitionMapType; | 312 | uint8_t partitionMapLength; |
331 | uint8_t partitionMapLength; | 313 | uint8_t partitionMapping[0]; |
332 | uint8_t partitionMapping[0]; | ||
333 | } __attribute__ ((packed)); | 314 | } __attribute__ ((packed)); |
334 | 315 | ||
335 | /* Partition Map Type (ECMA 167r3 3/10.7.1.1) */ | 316 | /* Partition Map Type (ECMA 167r3 3/10.7.1.1) */ |
@@ -338,51 +319,46 @@ struct genericPartitionMap | |||
338 | #define GP_PARTITION_MAP_TYPE_2 0x02 | 319 | #define GP_PARTITION_MAP_TYPE_2 0x02 |
339 | 320 | ||
340 | /* Type 1 Partition Map (ECMA 167r3 3/10.7.2) */ | 321 | /* Type 1 Partition Map (ECMA 167r3 3/10.7.2) */ |
341 | struct genericPartitionMap1 | 322 | struct genericPartitionMap1 { |
342 | { | 323 | uint8_t partitionMapType; |
343 | uint8_t partitionMapType; | 324 | uint8_t partitionMapLength; |
344 | uint8_t partitionMapLength; | 325 | __le16 volSeqNum; |
345 | __le16 volSeqNum; | 326 | __le16 partitionNum; |
346 | __le16 partitionNum; | ||
347 | } __attribute__ ((packed)); | 327 | } __attribute__ ((packed)); |
348 | 328 | ||
349 | /* Type 2 Partition Map (ECMA 167r3 3/10.7.3) */ | 329 | /* Type 2 Partition Map (ECMA 167r3 3/10.7.3) */ |
350 | struct genericPartitionMap2 | 330 | struct genericPartitionMap2 { |
351 | { | 331 | uint8_t partitionMapType; |
352 | uint8_t partitionMapType; | 332 | uint8_t partitionMapLength; |
353 | uint8_t partitionMapLength; | 333 | uint8_t partitionIdent[62]; |
354 | uint8_t partitionIdent[62]; | ||
355 | } __attribute__ ((packed)); | 334 | } __attribute__ ((packed)); |
356 | 335 | ||
357 | /* Unallocated Space Descriptor (ECMA 167r3 3/10.8) */ | 336 | /* Unallocated Space Descriptor (ECMA 167r3 3/10.8) */ |
358 | struct unallocSpaceDesc | 337 | struct unallocSpaceDesc { |
359 | { | 338 | tag descTag; |
360 | tag descTag; | 339 | __le32 volDescSeqNum; |
361 | __le32 volDescSeqNum; | 340 | __le32 numAllocDescs; |
362 | __le32 numAllocDescs; | 341 | extent_ad allocDescs[0]; |
363 | extent_ad allocDescs[0]; | ||
364 | } __attribute__ ((packed)); | 342 | } __attribute__ ((packed)); |
365 | 343 | ||
366 | /* Terminating Descriptor (ECMA 167r3 3/10.9) */ | 344 | /* Terminating Descriptor (ECMA 167r3 3/10.9) */ |
367 | struct terminatingDesc | 345 | struct terminatingDesc { |
368 | { | 346 | tag descTag; |
369 | tag descTag; | 347 | uint8_t reserved[496]; |
370 | uint8_t reserved[496]; | ||
371 | } __attribute__ ((packed)); | 348 | } __attribute__ ((packed)); |
372 | 349 | ||
373 | /* Logical Volume Integrity Descriptor (ECMA 167r3 3/10.10) */ | 350 | /* Logical Volume Integrity Descriptor (ECMA 167r3 3/10.10) */ |
374 | struct logicalVolIntegrityDesc | 351 | struct logicalVolIntegrityDesc { |
375 | { | 352 | tag descTag; |
376 | tag descTag; | 353 | timestamp recordingDateAndTime; |
377 | timestamp recordingDateAndTime; | 354 | __le32 integrityType; |
378 | __le32 integrityType; | 355 | extent_ad nextIntegrityExt; |
379 | extent_ad nextIntegrityExt; | 356 | uint8_t logicalVolContentsUse[32]; |
380 | uint8_t logicalVolContentsUse[32]; | 357 | __le32 numOfPartitions; |
381 | __le32 numOfPartitions; | 358 | __le32 lengthOfImpUse; |
382 | __le32 lengthOfImpUse; | 359 | __le32 freeSpaceTable[0]; |
383 | __le32 freeSpaceTable[0]; | 360 | __le32 sizeTable[0]; |
384 | __le32 sizeTable[0]; | 361 | uint8_t impUse[0]; |
385 | uint8_t impUse[0]; | ||
386 | } __attribute__ ((packed)); | 362 | } __attribute__ ((packed)); |
387 | 363 | ||
388 | /* Integrity Type (ECMA 167r3 3/10.10.3) */ | 364 | /* Integrity Type (ECMA 167r3 3/10.10.3) */ |
@@ -390,56 +366,49 @@ struct logicalVolIntegrityDesc | |||
390 | #define LVID_INTEGRITY_TYPE_CLOSE 0x00000001 | 366 | #define LVID_INTEGRITY_TYPE_CLOSE 0x00000001 |
391 | 367 | ||
392 | /* Recorded Address (ECMA 167r3 4/7.1) */ | 368 | /* Recorded Address (ECMA 167r3 4/7.1) */ |
393 | typedef struct | 369 | typedef struct { |
394 | { | 370 | __le32 logicalBlockNum; |
395 | __le32 logicalBlockNum; | 371 | __le16 partitionReferenceNum; |
396 | __le16 partitionReferenceNum; | ||
397 | } __attribute__ ((packed)) lb_addr; | 372 | } __attribute__ ((packed)) lb_addr; |
398 | 373 | ||
399 | /* ... and its in-core analog */ | 374 | /* ... and its in-core analog */ |
400 | typedef struct | 375 | typedef struct { |
401 | { | 376 | uint32_t logicalBlockNum; |
402 | uint32_t logicalBlockNum; | 377 | uint16_t partitionReferenceNum; |
403 | uint16_t partitionReferenceNum; | ||
404 | } kernel_lb_addr; | 378 | } kernel_lb_addr; |
405 | 379 | ||
406 | /* Short Allocation Descriptor (ECMA 167r3 4/14.14.1) */ | 380 | /* Short Allocation Descriptor (ECMA 167r3 4/14.14.1) */ |
407 | typedef struct | 381 | typedef struct { |
408 | { | 382 | __le32 extLength; |
409 | __le32 extLength; | 383 | __le32 extPosition; |
410 | __le32 extPosition; | ||
411 | } __attribute__ ((packed)) short_ad; | 384 | } __attribute__ ((packed)) short_ad; |
412 | 385 | ||
413 | /* Long Allocation Descriptor (ECMA 167r3 4/14.14.2) */ | 386 | /* Long Allocation Descriptor (ECMA 167r3 4/14.14.2) */ |
414 | typedef struct | 387 | typedef struct { |
415 | { | 388 | __le32 extLength; |
416 | __le32 extLength; | 389 | lb_addr extLocation; |
417 | lb_addr extLocation; | 390 | uint8_t impUse[6]; |
418 | uint8_t impUse[6]; | ||
419 | } __attribute__ ((packed)) long_ad; | 391 | } __attribute__ ((packed)) long_ad; |
420 | 392 | ||
421 | typedef struct | 393 | typedef struct { |
422 | { | 394 | uint32_t extLength; |
423 | uint32_t extLength; | 395 | kernel_lb_addr extLocation; |
424 | kernel_lb_addr extLocation; | 396 | uint8_t impUse[6]; |
425 | uint8_t impUse[6]; | ||
426 | } kernel_long_ad; | 397 | } kernel_long_ad; |
427 | 398 | ||
428 | /* Extended Allocation Descriptor (ECMA 167r3 4/14.14.3) */ | 399 | /* Extended Allocation Descriptor (ECMA 167r3 4/14.14.3) */ |
429 | typedef struct | 400 | typedef struct { |
430 | { | 401 | __le32 extLength; |
431 | __le32 extLength; | 402 | __le32 recordedLength; |
432 | __le32 recordedLength; | 403 | __le32 informationLength; |
433 | __le32 informationLength; | 404 | lb_addr extLocation; |
434 | lb_addr extLocation; | ||
435 | } __attribute__ ((packed)) ext_ad; | 405 | } __attribute__ ((packed)) ext_ad; |
436 | 406 | ||
437 | typedef struct | 407 | typedef struct { |
438 | { | 408 | uint32_t extLength; |
439 | uint32_t extLength; | 409 | uint32_t recordedLength; |
440 | uint32_t recordedLength; | 410 | uint32_t informationLength; |
441 | uint32_t informationLength; | 411 | kernel_lb_addr extLocation; |
442 | kernel_lb_addr extLocation; | ||
443 | } kernel_ext_ad; | 412 | } kernel_ext_ad; |
444 | 413 | ||
445 | /* Descriptor Tag (ECMA 167r3 4/7.2 - See 3/7.2) */ | 414 | /* Descriptor Tag (ECMA 167r3 4/7.2 - See 3/7.2) */ |
@@ -458,52 +427,49 @@ typedef struct | |||
458 | #define TAG_IDENT_EFE 0x010A | 427 | #define TAG_IDENT_EFE 0x010A |
459 | 428 | ||
460 | /* File Set Descriptor (ECMA 167r3 4/14.1) */ | 429 | /* File Set Descriptor (ECMA 167r3 4/14.1) */ |
461 | struct fileSetDesc | 430 | struct fileSetDesc { |
462 | { | 431 | tag descTag; |
463 | tag descTag; | 432 | timestamp recordingDateAndTime; |
464 | timestamp recordingDateAndTime; | 433 | __le16 interchangeLvl; |
465 | __le16 interchangeLvl; | 434 | __le16 maxInterchangeLvl; |
466 | __le16 maxInterchangeLvl; | 435 | __le32 charSetList; |
467 | __le32 charSetList; | 436 | __le32 maxCharSetList; |
468 | __le32 maxCharSetList; | 437 | __le32 fileSetNum; |
469 | __le32 fileSetNum; | 438 | __le32 fileSetDescNum; |
470 | __le32 fileSetDescNum; | 439 | charspec logicalVolIdentCharSet; |
471 | charspec logicalVolIdentCharSet; | 440 | dstring logicalVolIdent[128]; |
472 | dstring logicalVolIdent[128]; | 441 | charspec fileSetCharSet; |
473 | charspec fileSetCharSet; | 442 | dstring fileSetIdent[32]; |
474 | dstring fileSetIdent[32]; | 443 | dstring copyrightFileIdent[32]; |
475 | dstring copyrightFileIdent[32]; | 444 | dstring abstractFileIdent[32]; |
476 | dstring abstractFileIdent[32]; | 445 | long_ad rootDirectoryICB; |
477 | long_ad rootDirectoryICB; | 446 | regid domainIdent; |
478 | regid domainIdent; | 447 | long_ad nextExt; |
479 | long_ad nextExt; | 448 | long_ad streamDirectoryICB; |
480 | long_ad streamDirectoryICB; | 449 | uint8_t reserved[32]; |
481 | uint8_t reserved[32]; | ||
482 | } __attribute__ ((packed)); | 450 | } __attribute__ ((packed)); |
483 | 451 | ||
484 | /* Partition Header Descriptor (ECMA 167r3 4/14.3) */ | 452 | /* Partition Header Descriptor (ECMA 167r3 4/14.3) */ |
485 | struct partitionHeaderDesc | 453 | struct partitionHeaderDesc { |
486 | { | 454 | short_ad unallocSpaceTable; |
487 | short_ad unallocSpaceTable; | 455 | short_ad unallocSpaceBitmap; |
488 | short_ad unallocSpaceBitmap; | 456 | short_ad partitionIntegrityTable; |
489 | short_ad partitionIntegrityTable; | 457 | short_ad freedSpaceTable; |
490 | short_ad freedSpaceTable; | 458 | short_ad freedSpaceBitmap; |
491 | short_ad freedSpaceBitmap; | 459 | uint8_t reserved[88]; |
492 | uint8_t reserved[88]; | ||
493 | } __attribute__ ((packed)); | 460 | } __attribute__ ((packed)); |
494 | 461 | ||
495 | /* File Identifier Descriptor (ECMA 167r3 4/14.4) */ | 462 | /* File Identifier Descriptor (ECMA 167r3 4/14.4) */ |
496 | struct fileIdentDesc | 463 | struct fileIdentDesc { |
497 | { | 464 | tag descTag; |
498 | tag descTag; | 465 | __le16 fileVersionNum; |
499 | __le16 fileVersionNum; | 466 | uint8_t fileCharacteristics; |
500 | uint8_t fileCharacteristics; | 467 | uint8_t lengthFileIdent; |
501 | uint8_t lengthFileIdent; | 468 | long_ad icb; |
502 | long_ad icb; | 469 | __le16 lengthOfImpUse; |
503 | __le16 lengthOfImpUse; | 470 | uint8_t impUse[0]; |
504 | uint8_t impUse[0]; | 471 | uint8_t fileIdent[0]; |
505 | uint8_t fileIdent[0]; | 472 | uint8_t padding[0]; |
506 | uint8_t padding[0]; | ||
507 | } __attribute__ ((packed)); | 473 | } __attribute__ ((packed)); |
508 | 474 | ||
509 | /* File Characteristics (ECMA 167r3 4/14.4.3) */ | 475 | /* File Characteristics (ECMA 167r3 4/14.4.3) */ |
@@ -514,24 +480,22 @@ struct fileIdentDesc | |||
514 | #define FID_FILE_CHAR_METADATA 0x10 | 480 | #define FID_FILE_CHAR_METADATA 0x10 |
515 | 481 | ||
516 | /* Allocation Ext Descriptor (ECMA 167r3 4/14.5) */ | 482 | /* Allocation Ext Descriptor (ECMA 167r3 4/14.5) */ |
517 | struct allocExtDesc | 483 | struct allocExtDesc { |
518 | { | 484 | tag descTag; |
519 | tag descTag; | 485 | __le32 previousAllocExtLocation; |
520 | __le32 previousAllocExtLocation; | 486 | __le32 lengthAllocDescs; |
521 | __le32 lengthAllocDescs; | ||
522 | } __attribute__ ((packed)); | 487 | } __attribute__ ((packed)); |
523 | 488 | ||
524 | /* ICB Tag (ECMA 167r3 4/14.6) */ | 489 | /* ICB Tag (ECMA 167r3 4/14.6) */ |
525 | typedef struct | 490 | typedef struct { |
526 | { | 491 | __le32 priorRecordedNumDirectEntries; |
527 | __le32 priorRecordedNumDirectEntries; | 492 | __le16 strategyType; |
528 | __le16 strategyType; | 493 | __le16 strategyParameter; |
529 | __le16 strategyParameter; | 494 | __le16 numEntries; |
530 | __le16 numEntries; | 495 | uint8_t reserved; |
531 | uint8_t reserved; | 496 | uint8_t fileType; |
532 | uint8_t fileType; | 497 | lb_addr parentICBLocation; |
533 | lb_addr parentICBLocation; | 498 | __le16 flags; |
534 | __le16 flags; | ||
535 | } __attribute__ ((packed)) icbtag; | 499 | } __attribute__ ((packed)) icbtag; |
536 | 500 | ||
537 | /* Strategy Type (ECMA 167r3 4/14.6.2) */ | 501 | /* Strategy Type (ECMA 167r3 4/14.6.2) */ |
@@ -576,45 +540,42 @@ typedef struct | |||
576 | #define ICBTAG_FLAG_STREAM 0x2000 | 540 | #define ICBTAG_FLAG_STREAM 0x2000 |
577 | 541 | ||
578 | /* Indirect Entry (ECMA 167r3 4/14.7) */ | 542 | /* Indirect Entry (ECMA 167r3 4/14.7) */ |
579 | struct indirectEntry | 543 | struct indirectEntry { |
580 | { | 544 | tag descTag; |
581 | tag descTag; | 545 | icbtag icbTag; |
582 | icbtag icbTag; | 546 | long_ad indirectICB; |
583 | long_ad indirectICB; | ||
584 | } __attribute__ ((packed)); | 547 | } __attribute__ ((packed)); |
585 | 548 | ||
586 | /* Terminal Entry (ECMA 167r3 4/14.8) */ | 549 | /* Terminal Entry (ECMA 167r3 4/14.8) */ |
587 | struct terminalEntry | 550 | struct terminalEntry { |
588 | { | 551 | tag descTag; |
589 | tag descTag; | 552 | icbtag icbTag; |
590 | icbtag icbTag; | ||
591 | } __attribute__ ((packed)); | 553 | } __attribute__ ((packed)); |
592 | 554 | ||
593 | /* File Entry (ECMA 167r3 4/14.9) */ | 555 | /* File Entry (ECMA 167r3 4/14.9) */ |
594 | struct fileEntry | 556 | struct fileEntry { |
595 | { | 557 | tag descTag; |
596 | tag descTag; | 558 | icbtag icbTag; |
597 | icbtag icbTag; | 559 | __le32 uid; |
598 | __le32 uid; | 560 | __le32 gid; |
599 | __le32 gid; | 561 | __le32 permissions; |
600 | __le32 permissions; | 562 | __le16 fileLinkCount; |
601 | __le16 fileLinkCount; | 563 | uint8_t recordFormat; |
602 | uint8_t recordFormat; | 564 | uint8_t recordDisplayAttr; |
603 | uint8_t recordDisplayAttr; | 565 | __le32 recordLength; |
604 | __le32 recordLength; | 566 | __le64 informationLength; |
605 | __le64 informationLength; | 567 | __le64 logicalBlocksRecorded; |
606 | __le64 logicalBlocksRecorded; | 568 | timestamp accessTime; |
607 | timestamp accessTime; | 569 | timestamp modificationTime; |
608 | timestamp modificationTime; | 570 | timestamp attrTime; |
609 | timestamp attrTime; | 571 | __le32 checkpoint; |
610 | __le32 checkpoint; | 572 | long_ad extendedAttrICB; |
611 | long_ad extendedAttrICB; | 573 | regid impIdent; |
612 | regid impIdent; | 574 | __le64 uniqueID; |
613 | __le64 uniqueID; | 575 | __le32 lengthExtendedAttr; |
614 | __le32 lengthExtendedAttr; | 576 | __le32 lengthAllocDescs; |
615 | __le32 lengthAllocDescs; | 577 | uint8_t extendedAttr[0]; |
616 | uint8_t extendedAttr[0]; | 578 | uint8_t allocDescs[0]; |
617 | uint8_t allocDescs[0]; | ||
618 | } __attribute__ ((packed)); | 579 | } __attribute__ ((packed)); |
619 | 580 | ||
620 | /* Permissions (ECMA 167r3 4/14.9.5) */ | 581 | /* Permissions (ECMA 167r3 4/14.9.5) */ |
@@ -655,57 +616,52 @@ struct fileEntry | |||
655 | #define FE_RECORD_DISPLAY_ATTR_3 0x03 | 616 | #define FE_RECORD_DISPLAY_ATTR_3 0x03 |
656 | 617 | ||
657 | /* Extended Attribute Header Descriptor (ECMA 167r3 4/14.10.1) */ | 618 | /* Extended Attribute Header Descriptor (ECMA 167r3 4/14.10.1) */ |
658 | struct extendedAttrHeaderDesc | 619 | struct extendedAttrHeaderDesc { |
659 | { | 620 | tag descTag; |
660 | tag descTag; | 621 | __le32 impAttrLocation; |
661 | __le32 impAttrLocation; | 622 | __le32 appAttrLocation; |
662 | __le32 appAttrLocation; | ||
663 | } __attribute__ ((packed)); | 623 | } __attribute__ ((packed)); |
664 | 624 | ||
665 | /* Generic Format (ECMA 167r3 4/14.10.2) */ | 625 | /* Generic Format (ECMA 167r3 4/14.10.2) */ |
666 | struct genericFormat | 626 | struct genericFormat { |
667 | { | 627 | __le32 attrType; |
668 | __le32 attrType; | 628 | uint8_t attrSubtype; |
669 | uint8_t attrSubtype; | 629 | uint8_t reserved[3]; |
670 | uint8_t reserved[3]; | 630 | __le32 attrLength; |
671 | __le32 attrLength; | 631 | uint8_t attrData[0]; |
672 | uint8_t attrData[0]; | ||
673 | } __attribute__ ((packed)); | 632 | } __attribute__ ((packed)); |
674 | 633 | ||
675 | /* Character Set Information (ECMA 167r3 4/14.10.3) */ | 634 | /* Character Set Information (ECMA 167r3 4/14.10.3) */ |
676 | struct charSetInfo | 635 | struct charSetInfo { |
677 | { | 636 | __le32 attrType; |
678 | __le32 attrType; | 637 | uint8_t attrSubtype; |
679 | uint8_t attrSubtype; | 638 | uint8_t reserved[3]; |
680 | uint8_t reserved[3]; | 639 | __le32 attrLength; |
681 | __le32 attrLength; | 640 | __le32 escapeSeqLength; |
682 | __le32 escapeSeqLength; | 641 | uint8_t charSetType; |
683 | uint8_t charSetType; | 642 | uint8_t escapeSeq[0]; |
684 | uint8_t escapeSeq[0]; | ||
685 | } __attribute__ ((packed)); | 643 | } __attribute__ ((packed)); |
686 | 644 | ||
687 | /* Alternate Permissions (ECMA 167r3 4/14.10.4) */ | 645 | /* Alternate Permissions (ECMA 167r3 4/14.10.4) */ |
688 | struct altPerms | 646 | struct altPerms { |
689 | { | 647 | __le32 attrType; |
690 | __le32 attrType; | 648 | uint8_t attrSubtype; |
691 | uint8_t attrSubtype; | 649 | uint8_t reserved[3]; |
692 | uint8_t reserved[3]; | 650 | __le32 attrLength; |
693 | __le32 attrLength; | 651 | __le16 ownerIdent; |
694 | __le16 ownerIdent; | 652 | __le16 groupIdent; |
695 | __le16 groupIdent; | 653 | __le16 permission; |
696 | __le16 permission; | ||
697 | } __attribute__ ((packed)); | 654 | } __attribute__ ((packed)); |
698 | 655 | ||
699 | /* File Times Extended Attribute (ECMA 167r3 4/14.10.5) */ | 656 | /* File Times Extended Attribute (ECMA 167r3 4/14.10.5) */ |
700 | struct fileTimesExtAttr | 657 | struct fileTimesExtAttr { |
701 | { | 658 | __le32 attrType; |
702 | __le32 attrType; | 659 | uint8_t attrSubtype; |
703 | uint8_t attrSubtype; | 660 | uint8_t reserved[3]; |
704 | uint8_t reserved[3]; | 661 | __le32 attrLength; |
705 | __le32 attrLength; | 662 | __le32 dataLength; |
706 | __le32 dataLength; | 663 | __le32 fileTimeExistence; |
707 | __le32 fileTimeExistence; | 664 | uint8_t fileTimes; |
708 | uint8_t fileTimes; | ||
709 | } __attribute__ ((packed)); | 665 | } __attribute__ ((packed)); |
710 | 666 | ||
711 | /* FileTimeExistence (ECMA 167r3 4/14.10.5.6) */ | 667 | /* FileTimeExistence (ECMA 167r3 4/14.10.5.6) */ |
@@ -715,52 +671,48 @@ struct fileTimesExtAttr | |||
715 | #define FTE_BACKUP 0x00000002 | 671 | #define FTE_BACKUP 0x00000002 |
716 | 672 | ||
717 | /* Information Times Extended Attribute (ECMA 167r3 4/14.10.6) */ | 673 | /* Information Times Extended Attribute (ECMA 167r3 4/14.10.6) */ |
718 | struct infoTimesExtAttr | 674 | struct infoTimesExtAttr { |
719 | { | 675 | __le32 attrType; |
720 | __le32 attrType; | 676 | uint8_t attrSubtype; |
721 | uint8_t attrSubtype; | 677 | uint8_t reserved[3]; |
722 | uint8_t reserved[3]; | 678 | __le32 attrLength; |
723 | __le32 attrLength; | 679 | __le32 dataLength; |
724 | __le32 dataLength; | 680 | __le32 infoTimeExistence; |
725 | __le32 infoTimeExistence; | 681 | uint8_t infoTimes[0]; |
726 | uint8_t infoTimes[0]; | ||
727 | } __attribute__ ((packed)); | 682 | } __attribute__ ((packed)); |
728 | 683 | ||
729 | /* Device Specification (ECMA 167r3 4/14.10.7) */ | 684 | /* Device Specification (ECMA 167r3 4/14.10.7) */ |
730 | struct deviceSpec | 685 | struct deviceSpec { |
731 | { | 686 | __le32 attrType; |
732 | __le32 attrType; | 687 | uint8_t attrSubtype; |
733 | uint8_t attrSubtype; | 688 | uint8_t reserved[3]; |
734 | uint8_t reserved[3]; | 689 | __le32 attrLength; |
735 | __le32 attrLength; | 690 | __le32 impUseLength; |
736 | __le32 impUseLength; | 691 | __le32 majorDeviceIdent; |
737 | __le32 majorDeviceIdent; | 692 | __le32 minorDeviceIdent; |
738 | __le32 minorDeviceIdent; | 693 | uint8_t impUse[0]; |
739 | uint8_t impUse[0]; | ||
740 | } __attribute__ ((packed)); | 694 | } __attribute__ ((packed)); |
741 | 695 | ||
742 | /* Implementation Use Extended Attr (ECMA 167r3 4/14.10.8) */ | 696 | /* Implementation Use Extended Attr (ECMA 167r3 4/14.10.8) */ |
743 | struct impUseExtAttr | 697 | struct impUseExtAttr { |
744 | { | 698 | __le32 attrType; |
745 | __le32 attrType; | 699 | uint8_t attrSubtype; |
746 | uint8_t attrSubtype; | 700 | uint8_t reserved[3]; |
747 | uint8_t reserved[3]; | 701 | __le32 attrLength; |
748 | __le32 attrLength; | 702 | __le32 impUseLength; |
749 | __le32 impUseLength; | 703 | regid impIdent; |
750 | regid impIdent; | 704 | uint8_t impUse[0]; |
751 | uint8_t impUse[0]; | ||
752 | } __attribute__ ((packed)); | 705 | } __attribute__ ((packed)); |
753 | 706 | ||
754 | /* Application Use Extended Attribute (ECMA 167r3 4/14.10.9) */ | 707 | /* Application Use Extended Attribute (ECMA 167r3 4/14.10.9) */ |
755 | struct appUseExtAttr | 708 | struct appUseExtAttr { |
756 | { | 709 | __le32 attrType; |
757 | __le32 attrType; | 710 | uint8_t attrSubtype; |
758 | uint8_t attrSubtype; | 711 | uint8_t reserved[3]; |
759 | uint8_t reserved[3]; | 712 | __le32 attrLength; |
760 | __le32 attrLength; | 713 | __le32 appUseLength; |
761 | __le32 appUseLength; | 714 | regid appIdent; |
762 | regid appIdent; | 715 | uint8_t appUse[0]; |
763 | uint8_t appUse[0]; | ||
764 | } __attribute__ ((packed)); | 716 | } __attribute__ ((packed)); |
765 | 717 | ||
766 | #define EXTATTR_CHAR_SET 1 | 718 | #define EXTATTR_CHAR_SET 1 |
@@ -771,35 +723,31 @@ struct appUseExtAttr | |||
771 | #define EXTATTR_IMP_USE 2048 | 723 | #define EXTATTR_IMP_USE 2048 |
772 | #define EXTATTR_APP_USE 65536 | 724 | #define EXTATTR_APP_USE 65536 |
773 | 725 | ||
774 | |||
775 | /* Unallocated Space Entry (ECMA 167r3 4/14.11) */ | 726 | /* Unallocated Space Entry (ECMA 167r3 4/14.11) */ |
776 | struct unallocSpaceEntry | 727 | struct unallocSpaceEntry { |
777 | { | 728 | tag descTag; |
778 | tag descTag; | 729 | icbtag icbTag; |
779 | icbtag icbTag; | 730 | __le32 lengthAllocDescs; |
780 | __le32 lengthAllocDescs; | 731 | uint8_t allocDescs[0]; |
781 | uint8_t allocDescs[0]; | ||
782 | } __attribute__ ((packed)); | 732 | } __attribute__ ((packed)); |
783 | 733 | ||
784 | /* Space Bitmap Descriptor (ECMA 167r3 4/14.12) */ | 734 | /* Space Bitmap Descriptor (ECMA 167r3 4/14.12) */ |
785 | struct spaceBitmapDesc | 735 | struct spaceBitmapDesc { |
786 | { | 736 | tag descTag; |
787 | tag descTag; | 737 | __le32 numOfBits; |
788 | __le32 numOfBits; | 738 | __le32 numOfBytes; |
789 | __le32 numOfBytes; | 739 | uint8_t bitmap[0]; |
790 | uint8_t bitmap[0]; | ||
791 | } __attribute__ ((packed)); | 740 | } __attribute__ ((packed)); |
792 | 741 | ||
793 | /* Partition Integrity Entry (ECMA 167r3 4/14.13) */ | 742 | /* Partition Integrity Entry (ECMA 167r3 4/14.13) */ |
794 | struct partitionIntegrityEntry | 743 | struct partitionIntegrityEntry { |
795 | { | 744 | tag descTag; |
796 | tag descTag; | 745 | icbtag icbTag; |
797 | icbtag icbTag; | 746 | timestamp recordingDateAndTime; |
798 | timestamp recordingDateAndTime; | 747 | uint8_t integrityType; |
799 | uint8_t integrityType; | 748 | uint8_t reserved[175]; |
800 | uint8_t reserved[175]; | 749 | regid impIdent; |
801 | regid impIdent; | 750 | uint8_t impUse[256]; |
802 | uint8_t impUse[256]; | ||
803 | } __attribute__ ((packed)); | 751 | } __attribute__ ((packed)); |
804 | 752 | ||
805 | /* Short Allocation Descriptor (ECMA 167r3 4/14.14.1) */ | 753 | /* Short Allocation Descriptor (ECMA 167r3 4/14.14.1) */ |
@@ -815,50 +763,47 @@ struct partitionIntegrityEntry | |||
815 | /* Extended Allocation Descriptor (ECMA 167r3 4/14.14.3) */ | 763 | /* Extended Allocation Descriptor (ECMA 167r3 4/14.14.3) */ |
816 | 764 | ||
817 | /* Logical Volume Header Descriptor (ECMA 167r3 4/14.15) */ | 765 | /* Logical Volume Header Descriptor (ECMA 167r3 4/14.15) */ |
818 | struct logicalVolHeaderDesc | 766 | struct logicalVolHeaderDesc { |
819 | { | 767 | __le64 uniqueID; |
820 | __le64 uniqueID; | 768 | uint8_t reserved[24]; |
821 | uint8_t reserved[24]; | ||
822 | } __attribute__ ((packed)); | 769 | } __attribute__ ((packed)); |
823 | 770 | ||
824 | /* Path Component (ECMA 167r3 4/14.16.1) */ | 771 | /* Path Component (ECMA 167r3 4/14.16.1) */ |
825 | struct pathComponent | 772 | struct pathComponent { |
826 | { | 773 | uint8_t componentType; |
827 | uint8_t componentType; | 774 | uint8_t lengthComponentIdent; |
828 | uint8_t lengthComponentIdent; | 775 | __le16 componentFileVersionNum; |
829 | __le16 componentFileVersionNum; | 776 | dstring componentIdent[0]; |
830 | dstring componentIdent[0]; | ||
831 | } __attribute__ ((packed)); | 777 | } __attribute__ ((packed)); |
832 | 778 | ||
833 | /* File Entry (ECMA 167r3 4/14.17) */ | 779 | /* File Entry (ECMA 167r3 4/14.17) */ |
834 | struct extendedFileEntry | 780 | struct extendedFileEntry { |
835 | { | 781 | tag descTag; |
836 | tag descTag; | 782 | icbtag icbTag; |
837 | icbtag icbTag; | 783 | __le32 uid; |
838 | __le32 uid; | 784 | __le32 gid; |
839 | __le32 gid; | 785 | __le32 permissions; |
840 | __le32 permissions; | 786 | __le16 fileLinkCount; |
841 | __le16 fileLinkCount; | 787 | uint8_t recordFormat; |
842 | uint8_t recordFormat; | 788 | uint8_t recordDisplayAttr; |
843 | uint8_t recordDisplayAttr; | 789 | __le32 recordLength; |
844 | __le32 recordLength; | 790 | __le64 informationLength; |
845 | __le64 informationLength; | 791 | __le64 objectSize; |
846 | __le64 objectSize; | 792 | __le64 logicalBlocksRecorded; |
847 | __le64 logicalBlocksRecorded; | 793 | timestamp accessTime; |
848 | timestamp accessTime; | 794 | timestamp modificationTime; |
849 | timestamp modificationTime; | 795 | timestamp createTime; |
850 | timestamp createTime; | 796 | timestamp attrTime; |
851 | timestamp attrTime; | 797 | __le32 checkpoint; |
852 | __le32 checkpoint; | 798 | __le32 reserved; |
853 | __le32 reserved; | 799 | long_ad extendedAttrICB; |
854 | long_ad extendedAttrICB; | 800 | long_ad streamDirectoryICB; |
855 | long_ad streamDirectoryICB; | 801 | regid impIdent; |
856 | regid impIdent; | 802 | __le64 uniqueID; |
857 | __le64 uniqueID; | 803 | __le32 lengthExtendedAttr; |
858 | __le32 lengthExtendedAttr; | 804 | __le32 lengthAllocDescs; |
859 | __le32 lengthAllocDescs; | 805 | uint8_t extendedAttr[0]; |
860 | uint8_t extendedAttr[0]; | 806 | uint8_t allocDescs[0]; |
861 | uint8_t allocDescs[0]; | 807 | } __attribute__ ((packed)); |
862 | } __attribute__ ((packed)); | 808 | |
863 | 809 | #endif /* _ECMA_167_H */ | |
864 | #endif /* _ECMA_167_H */ | ||