Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
osta_udf.h
Go to the documentation of this file.
1 /*
2  * osta_udf.h
3  *
4  * This file is based on OSTA UDF(tm) 2.50 (April 30, 2003)
5  * http://www.osta.org
6  *
7  * Copyright (c) 2001-2004 Ben Fennema <[email protected]>
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  * notice, this list of conditions, and the following disclaimer,
15  * without modification.
16  * 2. The name of the author may not be used to endorse or promote products
17  * derived from this software without specific prior written permission.
18  *
19  * Alternatively, this software may be distributed under the terms of the
20  * GNU Public License ("GPL").
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
26  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32  * SUCH DAMAGE.
33  */
34 
35 #include "ecma_167.h"
36 
37 #ifndef _OSTA_UDF_H
38 #define _OSTA_UDF_H 1
39 
40 /* OSTA CS0 Charspec (UDF 2.50 2.1.2) */
41 #define UDF_CHAR_SET_TYPE 0
42 #define UDF_CHAR_SET_INFO "OSTA Compressed Unicode"
43 
44 /* Entity Identifier (UDF 2.50 2.1.5) */
45 /* Identifiers (UDF 2.50 2.1.5.2) */
46 #define UDF_ID_DEVELOPER "*Linux UDFFS"
47 #define UDF_ID_COMPLIANT "*OSTA UDF Compliant"
48 #define UDF_ID_LV_INFO "*UDF LV Info"
49 #define UDF_ID_FREE_EA "*UDF FreeEASpace"
50 #define UDF_ID_FREE_APP_EA "*UDF FreeAppEASpace"
51 #define UDF_ID_DVD_CGMS "*UDF DVD CGMS Info"
52 #define UDF_ID_OS2_EA "*UDF OS/2 EA"
53 #define UDF_ID_OS2_EA_LENGTH "*UDF OS/2 EALength"
54 #define UDF_ID_MAC_VOLUME "*UDF Mac VolumeInfo"
55 #define UDF_ID_MAC_FINDER "*UDF Mac FinderInfo"
56 #define UDF_ID_MAC_UNIQUE "*UDF Mac UniqueIDTable"
57 #define UDF_ID_MAC_RESOURCE "*UDF Mac ResourceFork"
58 #define UDF_ID_VIRTUAL "*UDF Virtual Partition"
59 #define UDF_ID_SPARABLE "*UDF Sparable Partition"
60 #define UDF_ID_ALLOC "*UDF Virtual Alloc Tbl"
61 #define UDF_ID_SPARING "*UDF Sparing Table"
62 #define UDF_ID_METADATA "*UDF Metadata Partition"
63 
64 /* Identifier Suffix (UDF 2.50 2.1.5.3) */
65 #define IS_DF_HARD_WRITE_PROTECT 0x01
66 #define IS_DF_SOFT_WRITE_PROTECT 0x02
67 
73 } __attribute__ ((packed));
74 
79 } __attribute__ ((packed));
80 
83 } __attribute__ ((packed));
84 
85 /* Logical Volume Integrity Descriptor (UDF 2.50 2.2.6) */
86 /* Implementation Use (UDF 2.50 2.2.6.4) */
88  struct regid impIdent;
95 } __attribute__ ((packed));
96 
97 /* Implementation Use Volume Descriptor (UDF 2.50 2.2.7) */
98 /* Implementation Use (UDF 2.50 2.2.7.2) */
105  struct regid impIdent;
107 } __attribute__ ((packed));
113  struct regid partIdent;
116 } __attribute__ ((packed));
118 /* Virtual Partition Map (UDF 2.50 2.2.8) */
123  struct regid partIdent;
127 } __attribute__ ((packed));
128 
129 /* Sparable Partition Map (UDF 2.50 2.2.9) */
134  struct regid partIdent;
142 } __attribute__ ((packed));
143 
144 /* Metadata Partition Map (UDF 2.4.0 2.2.10) */
149  struct regid partIdent;
159 } __attribute__ ((packed));
160 
161 /* Virtual Allocation Table (UDF 1.5 2.2.10) */
164  struct regid vatIdent;
166 } __attribute__ ((packed));
168 #define ICBTAG_FILE_TYPE_VAT15 0x00U
170 /* Virtual Allocation Table (UDF 2.50 2.2.11) */
184 } __attribute__ ((packed));
186 #define ICBTAG_FILE_TYPE_VAT20 0xF8U
187 
188 /* Sparing Table (UDF 2.50 2.2.12) */
189 struct sparingEntry {
192 } __attribute__ ((packed));
194 struct sparingTable {
195  struct tag descTag;
201  mapEntry[0];
202 } __attribute__ ((packed));
204 /* Metadata File (and Metadata Mirror File) (UDF 2.50 2.2.13.1) */
205 #define ICBTAG_FILE_TYPE_MAIN 0xFA
206 #define ICBTAG_FILE_TYPE_MIRROR 0xFB
207 #define ICBTAG_FILE_TYPE_BITMAP 0xFC
209 /* struct struct long_ad ICB - ADImpUse (UDF 2.50 2.2.4.3) */
213 } __attribute__ ((packed));
214 
215 #define AD_IU_EXT_ERASED 0x0001
216 
217 /* Real-Time Files (UDF 2.50 6.11) */
218 #define ICBTAG_FILE_TYPE_REALTIME 0xF9U
219 
220 /* Implementation Use Extended Attribute (UDF 2.50 3.3.4.5) */
221 /* FreeEASpace (UDF 2.50 3.3.4.5.1.1) */
222 struct freeEaSpace {
225 } __attribute__ ((packed));
227 /* DVD Copyright Management Information (UDF 2.50 3.3.4.5.1.2) */
233 } __attribute__ ((packed));
234 
235 /* Application Use Extended Attribute (UDF 2.50 3.3.4.6) */
236 /* FreeAppEASpace (UDF 2.50 3.3.4.6.1) */
240 } __attribute__ ((packed));
241 
242 /* UDF Defined System Stream (UDF 2.50 3.3.7) */
243 #define UDF_ID_UNIQUE_ID "*UDF Unique ID Mapping Data"
244 #define UDF_ID_NON_ALLOC "*UDF Non-Allocatable Space"
245 #define UDF_ID_POWER_CAL "*UDF Power Cal Table"
246 #define UDF_ID_BACKUP "*UDF Backup"
247 
248 /* Operating System Identifiers (UDF 2.50 6.3) */
249 #define UDF_OS_CLASS_UNDEF 0x00U
250 #define UDF_OS_CLASS_DOS 0x01U
251 #define UDF_OS_CLASS_OS2 0x02U
252 #define UDF_OS_CLASS_MAC 0x03U
253 #define UDF_OS_CLASS_UNIX 0x04U
254 #define UDF_OS_CLASS_WIN9X 0x05U
255 #define UDF_OS_CLASS_WINNT 0x06U
256 #define UDF_OS_CLASS_OS400 0x07U
257 #define UDF_OS_CLASS_BEOS 0x08U
258 #define UDF_OS_CLASS_WINCE 0x09U
259 
260 #define UDF_OS_ID_UNDEF 0x00U
261 #define UDF_OS_ID_DOS 0x00U
262 #define UDF_OS_ID_OS2 0x00U
263 #define UDF_OS_ID_MAC 0x00U
264 #define UDF_OS_ID_MAX_OSX 0x01U
265 #define UDF_OS_ID_UNIX 0x00U
266 #define UDF_OS_ID_AIX 0x01U
267 #define UDF_OS_ID_SOLARIS 0x02U
268 #define UDF_OS_ID_HPUX 0x03U
269 #define UDF_OS_ID_IRIX 0x04U
270 #define UDF_OS_ID_LINUX 0x05U
271 #define UDF_OS_ID_MKLINUX 0x06U
272 #define UDF_OS_ID_FREEBSD 0x07U
273 #define UDF_OS_ID_WIN9X 0x00U
274 #define UDF_OS_ID_WINNT 0x00U
275 #define UDF_OS_ID_OS400 0x00U
276 #define UDF_OS_ID_BEOS 0x00U
277 #define UDF_OS_ID_WINCE 0x00U
278 
279 #endif /* _OSTA_UDF_H */