Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * osta_udf.h |
| 3 | * |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 4 | * This file is based on OSTA UDF(tm) 2.60 (March 1, 2005) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | * http://www.osta.org |
| 6 | * |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 7 | * Copyright (c) 2001-2004 Ben Fennema |
| 8 | * Copyright (c) 2017-2019 Pali Rohár <pali.rohar@gmail.com> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * All rights reserved. |
| 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without |
| 12 | * modification, are permitted provided that the following conditions |
| 13 | * are met: |
| 14 | * 1. Redistributions of source code must retain the above copyright |
| 15 | * notice, this list of conditions, and the following disclaimer, |
| 16 | * without modification. |
| 17 | * 2. The name of the author may not be used to endorse or promote products |
| 18 | * derived from this software without specific prior written permission. |
| 19 | * |
| 20 | * Alternatively, this software may be distributed under the terms of the |
| 21 | * GNU Public License ("GPL"). |
| 22 | * |
| 23 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
| 24 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 25 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 26 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR |
| 27 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 28 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 33 | * SUCH DAMAGE. |
| 34 | */ |
| 35 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 36 | /** |
| 37 | * @file |
| 38 | * OSTA-UDF defines and structure definitions |
| 39 | */ |
| 40 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | #include "ecma_167.h" |
| 42 | |
| 43 | #ifndef _OSTA_UDF_H |
| 44 | #define _OSTA_UDF_H 1 |
| 45 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 46 | /* OSTA CS0 Charspec (UDF 2.60 2.1.2) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | #define UDF_CHAR_SET_TYPE 0 |
| 48 | #define UDF_CHAR_SET_INFO "OSTA Compressed Unicode" |
| 49 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 50 | /* Entity Identifier (UDF 2.60 2.1.5) */ |
| 51 | /* Identifiers (UDF 2.60 2.1.5.2) */ |
| 52 | /* Implementation Use Extended Attribute (UDF 2.60 3.3.4.5) */ |
| 53 | /* Virtual Allocation Table (UDF 1.50 2.2.10) */ |
| 54 | /* Logical Volume Extended Information (UDF 1.50 Errata, DCN 5003, 3.3.4.5.1.3) */ |
| 55 | /* OS2EA (UDF 1.50 3.3.4.5.3.1) */ |
| 56 | /* MacUniqueIDTable (UDF 1.50 3.3.4.5.4.3) */ |
| 57 | /* MacResourceFork (UDF 1.50 3.3.4.5.4.4) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | #define UDF_ID_DEVELOPER "*Linux UDFFS" |
| 59 | #define UDF_ID_COMPLIANT "*OSTA UDF Compliant" |
| 60 | #define UDF_ID_LV_INFO "*UDF LV Info" |
| 61 | #define UDF_ID_FREE_EA "*UDF FreeEASpace" |
| 62 | #define UDF_ID_FREE_APP_EA "*UDF FreeAppEASpace" |
| 63 | #define UDF_ID_DVD_CGMS "*UDF DVD CGMS Info" |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 64 | #define UDF_ID_VAT_LVEXTENSION "*UDF VAT LVExtension" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | #define UDF_ID_OS2_EA "*UDF OS/2 EA" |
| 66 | #define UDF_ID_OS2_EA_LENGTH "*UDF OS/2 EALength" |
| 67 | #define UDF_ID_MAC_VOLUME "*UDF Mac VolumeInfo" |
| 68 | #define UDF_ID_MAC_FINDER "*UDF Mac FinderInfo" |
| 69 | #define UDF_ID_MAC_UNIQUE "*UDF Mac UniqueIDTable" |
| 70 | #define UDF_ID_MAC_RESOURCE "*UDF Mac ResourceFork" |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 71 | #define UDF_ID_OS400_DIRINFO "*UDF OS/400 DirInfo" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | #define UDF_ID_VIRTUAL "*UDF Virtual Partition" |
| 73 | #define UDF_ID_SPARABLE "*UDF Sparable Partition" |
| 74 | #define UDF_ID_ALLOC "*UDF Virtual Alloc Tbl" |
| 75 | #define UDF_ID_SPARING "*UDF Sparing Table" |
| 76 | #define UDF_ID_METADATA "*UDF Metadata Partition" |
| 77 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 78 | /* Identifier Suffix (UDF 2.60 2.1.5.3) */ |
Pali Rohár | 871b9b1 | 2020-01-07 22:29:03 +0100 | [diff] [blame] | 79 | #define DOMAIN_FLAGS_HARD_WRITE_PROTECT 0x01 |
| 80 | #define DOMAIN_FLAGS_SOFT_WRITE_PROTECT 0x02 |
| 81 | |
| 82 | struct domainIdentSuffix { |
| 83 | __le16 UDFRevision; |
| 84 | uint8_t domainFlags; |
| 85 | uint8_t reserved[5]; |
| 86 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 88 | struct UDFIdentSuffix { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 89 | __le16 UDFRevision; |
| 90 | uint8_t OSClass; |
| 91 | uint8_t OSIdentifier; |
| 92 | uint8_t reserved[4]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 93 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 94 | |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 95 | struct impIdentSuffix { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 96 | uint8_t OSClass; |
| 97 | uint8_t OSIdentifier; |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 98 | uint8_t impUse[6]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 99 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 100 | |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 101 | struct appIdentSuffix { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 102 | uint8_t impUse[8]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 103 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 105 | /* Logical Volume Integrity Descriptor (UDF 2.60 2.2.6) */ |
| 106 | /* Implementation Use (UDF 2.60 2.2.6.4) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 107 | struct logicalVolIntegrityDescImpUse { |
Pekka Enberg | 5ca4e4b | 2008-10-15 12:28:03 +0200 | [diff] [blame] | 108 | struct regid impIdent; |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 109 | __le32 numFiles; |
| 110 | __le32 numDirs; |
| 111 | __le16 minUDFReadRev; |
| 112 | __le16 minUDFWriteRev; |
| 113 | __le16 maxUDFWriteRev; |
| 114 | uint8_t impUse[0]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 115 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 117 | /* Implementation Use Volume Descriptor (UDF 2.60 2.2.7) */ |
| 118 | /* Implementation Use (UDF 2.60 2.2.7.2) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 119 | struct impUseVolDescImpUse { |
Pekka Enberg | 5ca4e4b | 2008-10-15 12:28:03 +0200 | [diff] [blame] | 120 | struct charspec LVICharset; |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 121 | dstring logicalVolIdent[128]; |
| 122 | dstring LVInfo1[36]; |
| 123 | dstring LVInfo2[36]; |
| 124 | dstring LVInfo3[36]; |
Pekka Enberg | 5ca4e4b | 2008-10-15 12:28:03 +0200 | [diff] [blame] | 125 | struct regid impIdent; |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 126 | uint8_t impUse[128]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 127 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 128 | |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 129 | struct udfPartitionMap2 { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 130 | uint8_t partitionMapType; |
| 131 | uint8_t partitionMapLength; |
| 132 | uint8_t reserved1[2]; |
Pekka Enberg | 5ca4e4b | 2008-10-15 12:28:03 +0200 | [diff] [blame] | 133 | struct regid partIdent; |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 134 | __le16 volSeqNum; |
| 135 | __le16 partitionNum; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 136 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 137 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 138 | /* Virtual Partition Map (UDF 2.60 2.2.8) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 139 | struct virtualPartitionMap { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 140 | uint8_t partitionMapType; |
| 141 | uint8_t partitionMapLength; |
| 142 | uint8_t reserved1[2]; |
Pekka Enberg | 5ca4e4b | 2008-10-15 12:28:03 +0200 | [diff] [blame] | 143 | struct regid partIdent; |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 144 | __le16 volSeqNum; |
| 145 | __le16 partitionNum; |
| 146 | uint8_t reserved2[24]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 147 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 148 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 149 | /* Sparable Partition Map (UDF 2.60 2.2.9) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 150 | struct sparablePartitionMap { |
| 151 | uint8_t partitionMapType; |
| 152 | uint8_t partitionMapLength; |
| 153 | uint8_t reserved1[2]; |
Pekka Enberg | 5ca4e4b | 2008-10-15 12:28:03 +0200 | [diff] [blame] | 154 | struct regid partIdent; |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 155 | __le16 volSeqNum; |
| 156 | __le16 partitionNum; |
| 157 | __le16 packetLength; |
| 158 | uint8_t numSparingTables; |
| 159 | uint8_t reserved2[1]; |
| 160 | __le32 sizeSparingTable; |
| 161 | __le32 locSparingTable[4]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 162 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 163 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 164 | /* Metadata Partition Map (UDF 2.60 2.2.10) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 165 | struct metadataPartitionMap { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 166 | uint8_t partitionMapType; |
| 167 | uint8_t partitionMapLength; |
| 168 | uint8_t reserved1[2]; |
Pekka Enberg | 5ca4e4b | 2008-10-15 12:28:03 +0200 | [diff] [blame] | 169 | struct regid partIdent; |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 170 | __le16 volSeqNum; |
| 171 | __le16 partitionNum; |
| 172 | __le32 metadataFileLoc; |
| 173 | __le32 metadataMirrorFileLoc; |
| 174 | __le32 metadataBitmapFileLoc; |
| 175 | __le32 allocUnitSize; |
| 176 | __le16 alignUnitSize; |
| 177 | uint8_t flags; |
| 178 | uint8_t reserved2[5]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 179 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 180 | |
| 181 | /* Virtual Allocation Table (UDF 1.5 2.2.10) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 182 | struct virtualAllocationTable15 { |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 183 | __le32 vatEntry[0]; |
Pekka Enberg | 5ca4e4b | 2008-10-15 12:28:03 +0200 | [diff] [blame] | 184 | struct regid vatIdent; |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 185 | __le32 previousVATICBLoc; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 186 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | |
| 188 | #define ICBTAG_FILE_TYPE_VAT15 0x00U |
| 189 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 190 | /* Virtual Allocation Table (UDF 2.60 2.2.11) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 191 | struct virtualAllocationTable20 { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 192 | __le16 lengthHeader; |
| 193 | __le16 lengthImpUse; |
| 194 | dstring logicalVolIdent[128]; |
| 195 | __le32 previousVATICBLoc; |
| 196 | __le32 numFiles; |
| 197 | __le32 numDirs; |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 198 | __le16 minUDFReadRev; |
| 199 | __le16 minUDFWriteRev; |
| 200 | __le16 maxUDFWriteRev; |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 201 | __le16 reserved; |
| 202 | uint8_t impUse[0]; |
| 203 | __le32 vatEntry[0]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 204 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 205 | |
| 206 | #define ICBTAG_FILE_TYPE_VAT20 0xF8U |
| 207 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 208 | /* Sparing Table (UDF 2.60 2.2.12) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 209 | struct sparingEntry { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 210 | __le32 origLocation; |
| 211 | __le32 mappedLocation; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 212 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 213 | |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 214 | struct sparingTable { |
Pekka Enberg | 5ca4e4b | 2008-10-15 12:28:03 +0200 | [diff] [blame] | 215 | struct tag descTag; |
| 216 | struct regid sparingIdent; |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 217 | __le16 reallocationTableLen; |
| 218 | __le16 reserved; |
| 219 | __le32 sequenceNum; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 220 | struct sparingEntry |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 221 | mapEntry[0]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 222 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 223 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 224 | /* Metadata File (and Metadata Mirror File) (UDF 2.60 2.2.13.1) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 225 | #define ICBTAG_FILE_TYPE_MAIN 0xFA |
| 226 | #define ICBTAG_FILE_TYPE_MIRROR 0xFB |
| 227 | #define ICBTAG_FILE_TYPE_BITMAP 0xFC |
| 228 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 229 | /* struct struct long_ad ICB - ADImpUse (UDF 2.60 2.2.4.3) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 230 | struct allocDescImpUse { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 231 | __le16 flags; |
| 232 | uint8_t impUse[4]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 233 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 234 | |
| 235 | #define AD_IU_EXT_ERASED 0x0001 |
| 236 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 237 | /* Real-Time Files (UDF 2.60 6.11) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 238 | #define ICBTAG_FILE_TYPE_REALTIME 0xF9U |
| 239 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 240 | /* Implementation Use Extended Attribute (UDF 2.60 3.3.4.5) */ |
| 241 | /* FreeEASpace (UDF 2.60 3.3.4.5.1.1) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 242 | struct freeEaSpace { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 243 | __le16 headerChecksum; |
| 244 | uint8_t freeEASpace[0]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 245 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 247 | /* DVD Copyright Management Information (UDF 2.60 3.3.4.5.1.2) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 248 | struct DVDCopyrightImpUse { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 249 | __le16 headerChecksum; |
| 250 | uint8_t CGMSInfo; |
| 251 | uint8_t dataType; |
| 252 | uint8_t protectionSystemInfo[4]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 253 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 254 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 255 | /* Logical Volume Extended Information (UDF 1.50 Errata, DCN 5003, 3.3.4.5.1.3) */ |
| 256 | struct LVExtensionEA { |
| 257 | __le16 headerChecksum; |
| 258 | __le64 verificationID; |
| 259 | __le32 numFiles; |
| 260 | __le32 numDirs; |
| 261 | dstring logicalVolIdent[128]; |
| 262 | } __packed; |
| 263 | |
| 264 | /* Application Use Extended Attribute (UDF 2.60 3.3.4.6) */ |
| 265 | /* FreeAppEASpace (UDF 2.60 3.3.4.6.1) */ |
Cyrill Gorcunov | cb00ea3 | 2007-07-19 01:47:43 -0700 | [diff] [blame] | 266 | struct freeAppEASpace { |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 267 | __le16 headerChecksum; |
| 268 | uint8_t freeEASpace[0]; |
Fabian Frederick | 75f2713 | 2017-01-06 21:53:49 +0100 | [diff] [blame] | 269 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 270 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 271 | /* UDF Defined System Stream (UDF 2.60 3.3.7) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 272 | #define UDF_ID_UNIQUE_ID "*UDF Unique ID Mapping Data" |
| 273 | #define UDF_ID_NON_ALLOC "*UDF Non-Allocatable Space" |
| 274 | #define UDF_ID_POWER_CAL "*UDF Power Cal Table" |
| 275 | #define UDF_ID_BACKUP "*UDF Backup" |
| 276 | |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 277 | /* UDF Defined Non-System Streams (UDF 2.60 3.3.8) */ |
| 278 | #define UDF_ID_MAC_RESOURCE_FORK_STREAM "*UDF Macintosh Resource Fork" |
| 279 | /* #define UDF_ID_OS2_EA "*UDF OS/2 EA" */ |
| 280 | #define UDF_ID_NT_ACL "*UDF NT ACL" |
| 281 | #define UDF_ID_UNIX_ACL "*UDF UNIX ACL" |
| 282 | |
| 283 | /* Operating System Identifiers (UDF 2.60 6.3) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 284 | #define UDF_OS_CLASS_UNDEF 0x00U |
| 285 | #define UDF_OS_CLASS_DOS 0x01U |
| 286 | #define UDF_OS_CLASS_OS2 0x02U |
| 287 | #define UDF_OS_CLASS_MAC 0x03U |
| 288 | #define UDF_OS_CLASS_UNIX 0x04U |
| 289 | #define UDF_OS_CLASS_WIN9X 0x05U |
| 290 | #define UDF_OS_CLASS_WINNT 0x06U |
| 291 | #define UDF_OS_CLASS_OS400 0x07U |
| 292 | #define UDF_OS_CLASS_BEOS 0x08U |
| 293 | #define UDF_OS_CLASS_WINCE 0x09U |
| 294 | |
| 295 | #define UDF_OS_ID_UNDEF 0x00U |
| 296 | #define UDF_OS_ID_DOS 0x00U |
| 297 | #define UDF_OS_ID_OS2 0x00U |
| 298 | #define UDF_OS_ID_MAC 0x00U |
| 299 | #define UDF_OS_ID_MAX_OSX 0x01U |
| 300 | #define UDF_OS_ID_UNIX 0x00U |
| 301 | #define UDF_OS_ID_AIX 0x01U |
| 302 | #define UDF_OS_ID_SOLARIS 0x02U |
| 303 | #define UDF_OS_ID_HPUX 0x03U |
| 304 | #define UDF_OS_ID_IRIX 0x04U |
| 305 | #define UDF_OS_ID_LINUX 0x05U |
| 306 | #define UDF_OS_ID_MKLINUX 0x06U |
| 307 | #define UDF_OS_ID_FREEBSD 0x07U |
Pali Rohár | 6146446 | 2020-01-07 22:29:04 +0100 | [diff] [blame] | 308 | #define UDF_OS_ID_NETBSD 0x08U |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 309 | #define UDF_OS_ID_WIN9X 0x00U |
| 310 | #define UDF_OS_ID_WINNT 0x00U |
| 311 | #define UDF_OS_ID_OS400 0x00U |
| 312 | #define UDF_OS_ID_BEOS 0x00U |
| 313 | #define UDF_OS_ID_WINCE 0x00U |
| 314 | |
Cyrill Gorcunov | 28de794 | 2007-07-21 04:37:18 -0700 | [diff] [blame] | 315 | #endif /* _OSTA_UDF_H */ |