1 #if !defined(_LINUX_UDF_UDF_H)
2 #define _LINUX_UDF_UDF_H
7 * OSTA-UDF(tm) format specification [based on ECMA 167 standard].
11 * E-mail regarding any portion of the Linux UDF file system should be
12 * directed to the development team mailing list (run by majordomo):
13 * linux_udf@hootie.lvld.hp.com
16 * This file is distributed under the terms of the GNU General Public
17 * License (GPL). Copies of the GPL can be obtained from:
18 * ftp://prep.ai.mit.edu/pub/gnu/GPL
19 * Each contributing author retains all rights to their own work.
22 * July 1, 1997 - Andrew E. Mileski
23 * Written, tested, and released.
25 * 10/2/98 dgb changed UDF_ID_DEVELOPER
26 * 11/26/98 bf changed UDF_ID_DEVELOPER,
27 * 12/5/98 dgb updated include file hierarchy, more UDF definitions
30 /* based on ECMA 167 structure definitions */
31 #include <linux/udf_167.h>
35 /* -------- Basic types and constants ----------- */
36 /* UDF character set (UDF 1.50 2.1.2) */
37 #define UDF_CHAR_SET_TYPE 0
38 #define UDF_CHAR_SET_INFO "OSTA Compressed Unicode"
40 #define UDF_ID_DEVELOPER "*Linux UDFFS"
42 /* UDF 1.02 2.2.6.4 */
43 struct LogicalVolIntegrityDescImpUse
49 Uint16 minUDFWriteRev
;
50 Uint16 maxUDFWriteRev
;
53 /* UDF 1.02 2.2.7.2 */
54 /* LVInformation may be present in ImpUseVolDesc.impUse */
55 struct ImpUseVolDescImpUse
58 dstring logicalVolIdent
[128];
66 struct UdfPartitionMap2
68 Uint8 partitionMapType
;
69 Uint8 partitionMapLength
;
78 struct VirtualPartitionMap
80 Uint8 partitionMapType
; /* 2 */
81 Uint8 partitionMapLength
; /* 64 */
82 Uint8 reserved1
[2]; /* #00 */
86 Uint8 reserved2
[24]; /* #00 */
90 struct SparablePartitionMap
92 Uint8 partitionMapType
; /* 2 */
93 Uint8 partitionMapLength
; /* 64 */
94 Uint8 reserved1
[2]; /* #00 */
95 EntityID partIdent
; /* Flags = 0 */
96 /* Id = UDF_ID_SPARABLE */
100 Uint16 packetLength
; /* 32 */
101 Uint8 numSparingTables
;
102 Uint8 reserved2
[1]; /* #00 */
103 Uint32 sizeSparingTable
;
104 Uint32 locSparingTable
[4];
107 /* DVD Copyright Management Info, see UDF 1.02 3.3.4.5.1.2 */
108 /* when ImpUseExtendedAttr.impIdent= "*UDF DVD CGMS Info" */
109 struct DVDCopyrightImpUse
{
110 Uint16 headerChecksum
;
113 Uint8 protectionSystemInfo
[4];
116 /* the impUse of long_ad used in AllocDescs - UDF 1.02 2.3.10.1 */
123 /* UDF 1.02 2.3.10.1 */
124 #define UDF_EXTENT_LENGTH_MASK 0x3FFFFFFF
125 #define UDF_EXTENT_FLAG_MASK 0xc0000000
126 #define UDF_EXTENT_FLAG_ERASED 0x40000000
129 * Important! VirtualAllocationTables are
130 * very different between 1.5 and 2.0!
133 /* ----------- 1.5 ------------- */
135 #define FILE_TYPE_VAT15 0x0U
137 /* UDF 1.5 2.2.10 - VAT layout: */
138 struct VirutalAllocationTable15
{
139 Uint32 VirtualSector
[0];
141 Uint32 previousVATICB
;
143 /* where number of VirtualSector's is (VATSize-36)/4 */
145 /* ----------- 2.0 ------------- */
147 #define FILE_TYPE_VAT20 0xf8U
149 /* UDF 2.0 2.2.10 (different from 1.5!) */
150 struct VirtualAllocationTable20
{
153 dstring logicalVolIdent
[128];
154 Uint32 previousVatICBLoc
;
156 Uint32 numFIDSDirectories
; /* non-parent */
157 Uint16 minReadRevision
;
158 Uint16 minWriteRevision
;
159 Uint16 maxWriteRevision
;
165 /* Sparing maps, see UDF 1.5 2.2.11 */
168 Uint32 mappedLocation
;
171 /* sparing maps, see UDF 2.0 2.2.11 */
172 struct SparingTable
{
174 EntityID sparingIdent
; /* *UDF Sparing Table */
175 Uint16 reallocationTableLen
;
176 Uint16 reserved
; /* #00 */
178 SparingEntry mapEntry
[0];
181 /* Entity Identifiers (UDF 1.50 6.1) */
182 #define UDF_ID_COMPLIANT "*OSTA UDF Compliant"
183 #define UDF_ID_LV_INFO "*UDF LV Info"
184 #define UDF_ID_FREE_EA "*UDF FreeEASpace"
185 #define UDF_ID_FREE_APP_EA "*UDF FreeAppEASpace"
186 #define UDF_ID_DVD_CGMS "*UDF DVD CGMS Info"
187 #define UDF_ID_OS2_EA "*UDF OS/2 EA"
188 #define UDF_ID_OS2_EA_LENGTH "*UDF OS/2 EALength"
189 #define UDF_ID_MAC_VOLUME "*UDF Mac VolumeInfo"
190 #define UDF_ID_MAC_FINDER "*UDF Mac FinderInfo"
191 #define UDF_ID_MAC_UNIQUE "*UDF Mac UniqueIDTable"
192 #define UDF_ID_MAC_RESOURCE "*UDF Mac ResourceFork"
193 #define UDF_ID_VIRTUAL "*UDF Virtual Partition"
194 #define UDF_ID_SPARABLE "*UDF Sparable Partition"
195 #define UDF_ID_ALLOC "*UDF Virtual Alloc Tbl"
196 #define UDF_ID_SPARING "*UDF Sparing Table"
198 /* Operating System Identifiers (UDF 1.50 6.3) */
199 #define UDF_OS_CLASS_UNDEF 0x00U
200 #define UDF_OS_CLASS_DOS 0x01U
201 #define UDF_OS_CLASS_OS2 0x02U
202 #define UDF_OS_CLASS_MAC 0x03U
203 #define UDF_OS_CLASS_UNIX 0x04U
204 #define UDF_OS_CLASS_WIN95 0x05U
205 #define UDF_OS_CLASS_WINNT 0x06U
206 #define UDF_OS_ID_UNDEF 0x00U
207 #define UDF_OS_ID_DOS 0x00U
208 #define UDF_OS_ID_OS2 0x00U
209 #define UDF_OS_ID_MAC 0x00U
210 #define UDF_OS_ID_UNIX 0x00U
211 #define UDF_OS_ID_WIN95 0x00U
212 #define UDF_OS_ID_WINNT 0x00U
213 #define UDF_OS_ID_AIX 0x01U
214 #define UDF_OS_ID_SOLARIS 0x02U
215 #define UDF_OS_ID_HPUX 0x03U
216 #define UDF_OS_ID_IRIX 0x04U
217 #define UDF_OS_ID_LINUX 0x05U
218 #define UDF_OS_ID_MKLINUX 0x06U
219 #define UDF_OS_ID_FREEBSD 0x07U
221 #define UDF_NAME_PAD 4
222 #define UDF_NAME_LEN 255
223 #define UDF_PATH_LEN 1023
227 #endif /* !defined(_LINUX_UDF_FMT_H) */