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
[0];
108 /* DVD Copyright Management Info, see UDF 1.02 3.3.4.5.1.2 */
109 /* when ImpUseExtendedAttr.impIdent= "*UDF DVD CGMS Info" */
110 struct DVDCopyrightImpUse
{
111 Uint16 headerChecksum
;
114 Uint8 protectionSystemInfo
[4];
117 /* the impUse of long_ad used in AllocDescs - UDF 1.02 2.3.10.1 */
124 /* UDF 1.02 2.3.10.1 */
125 #define UDF_EXTENT_LENGTH_MASK 0x3FFFFFFF
126 #define UDF_EXTENT_FLAG_MASK 0xc0000000
127 #define UDF_EXTENT_FLAG_ERASED 0x40000000
130 * Important! VirtualAllocationTables are
131 * very different between 1.5 and 2.0!
134 /* ----------- 1.5 ------------- */
136 #define FILE_TYPE_VAT15 0x0U
138 /* UDF 1.5 2.2.10 - VAT layout: */
139 struct VirutalAllocationTable15
{
140 Uint32 VirtualSector
[0];
142 Uint32 previousVATICB
;
144 /* where number of VirtualSector's is (VATSize-36)/4 */
146 /* ----------- 2.0 ------------- */
148 #define FILE_TYPE_VAT20 0xf8U
150 /* UDF 2.0 2.2.10 (different from 1.5!) */
151 struct VirtualAllocationTable20
{
154 dstring logicalVolIdent
[128];
155 Uint32 previousVatICBLoc
;
157 Uint32 numFIDSDirectories
; /* non-parent */
158 Uint16 minReadRevision
;
159 Uint16 minWriteRevision
;
160 Uint16 maxWriteRevision
;
166 /* Sparing maps, see UDF 1.5 2.2.11 */
169 Uint32 mappedLocation
;
172 /* sparing maps, see UDF 2.0 2.2.11 */
173 struct SparingTable
{
175 EntityID sparingIdent
; /* *UDF Sparing Table */
176 Uint16 reallocationTableLen
;
177 Uint16 reserved
; /* #00 */
179 SparingEntry mapEntry
[0];
182 /* Entity Identifiers (UDF 1.50 6.1) */
183 #define UDF_ID_COMPLIANT "*OSTA UDF Compliant"
184 #define UDF_ID_LV_INFO "*UDF LV Info"
185 #define UDF_ID_FREE_EA "*UDF FreeEASpace"
186 #define UDF_ID_FREE_APP_EA "*UDF FreeAppEASpace"
187 #define UDF_ID_DVD_CGMS "*UDF DVD CGMS Info"
188 #define UDF_ID_OS2_EA "*UDF OS/2 EA"
189 #define UDF_ID_OS2_EA_LENGTH "*UDF OS/2 EALength"
190 #define UDF_ID_MAC_VOLUME "*UDF Mac VolumeInfo"
191 #define UDF_ID_MAC_FINDER "*UDF Mac FinderInfo"
192 #define UDF_ID_MAC_UNIQUE "*UDF Mac UniqueIDTable"
193 #define UDF_ID_MAC_RESOURCE "*UDF Mac ResourceFork"
194 #define UDF_ID_VIRTUAL "*UDF Virtual Partition"
195 #define UDF_ID_SPARABLE "*UDF Sparable Partition"
196 #define UDF_ID_ALLOC "*UDF Virtual Alloc Tbl"
197 #define UDF_ID_SPARING "*UDF Sparing Table"
199 /* Operating System Identifiers (UDF 1.50 6.3) */
200 #define UDF_OS_CLASS_UNDEF 0x00U
201 #define UDF_OS_CLASS_DOS 0x01U
202 #define UDF_OS_CLASS_OS2 0x02U
203 #define UDF_OS_CLASS_MAC 0x03U
204 #define UDF_OS_CLASS_UNIX 0x04U
205 #define UDF_OS_CLASS_WIN95 0x05U
206 #define UDF_OS_CLASS_WINNT 0x06U
207 #define UDF_OS_ID_UNDEF 0x00U
208 #define UDF_OS_ID_DOS 0x00U
209 #define UDF_OS_ID_OS2 0x00U
210 #define UDF_OS_ID_MAC 0x00U
211 #define UDF_OS_ID_UNIX 0x00U
212 #define UDF_OS_ID_WIN95 0x00U
213 #define UDF_OS_ID_WINNT 0x00U
214 #define UDF_OS_ID_AIX 0x01U
215 #define UDF_OS_ID_SOLARIS 0x02U
216 #define UDF_OS_ID_HPUX 0x03U
217 #define UDF_OS_ID_IRIX 0x04U
218 #define UDF_OS_ID_LINUX 0x05U
219 #define UDF_OS_ID_MKLINUX 0x06U
220 #define UDF_OS_ID_FREEBSD 0x07U
222 #define UDF_NAME_PAD 4
223 #define UDF_NAME_LEN 255
224 #define UDF_PATH_LEN 1023
228 #endif /* !defined(_LINUX_UDF_FMT_H) */