2 * Copyright (C) 2013, The AROS Development Team
4 * Author: Jason S. McMullan <jason.mcmullan@gmail.com>
6 * Licensed under the AROS PUBLIC LICENSE (APL) Version 1.1
12 #include <exec/types.h>
13 #include <dos/filehandler.h>
17 typedef TEXT strA
; /* ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_
20 typedef TEXT strD
; /* ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_ */
21 typedef struct { ULONG LSB
; ULONG MSB
; } int32LM
;
22 typedef struct { UWORD LSB
; UWORD MSB
;} int16LM
;
35 int8 TimeZone
; /* 0 = GMT-12, 1 = GMT-11:45, 2 = GMT-11:30, etc */
39 int8 Years
; /* 1900 + Year */
40 int8 Month
; /* Base 1 */
41 int8 Day
; /* Base 1 */
42 int8 Hour
; /* Base 0 */
43 int8 Minute
; /* Base 0 */
44 int8 Second
; /* Base 0 */
45 int8 TimeZone
; /* 0 = GMT-12, 1 = GMT-11:45, 2 = GMT-11:30, etc */
50 #define ISO_Volume_Boot 0
51 #define ISO_Volume_Primary 1
52 #define ISO_Volume_Supplementary 2
53 #define ISO_Volume_Partition 3
54 #define ISO_Volume_Terminator 255
59 struct isoVolumeBoot
{
60 strA BootSystemIdentifier
[32];
61 strA BootIdentifier
[32];
62 UBYTE BootSystemUse
[1977];
64 struct isoVolumePrimary
{
66 strA SystemIdentifier
[32];
67 strD VolumeIdentifier
[32];
69 int32LM VolumeSpaceSize
;
71 int16LM VolumeSetSize
;
72 int16LM VolumeSequenceNumber
;
73 int16LM LogicalBlockSize
;
74 int32LM PathTableSize
;
75 int32L TypeLPathTable
;
76 int32L TypeLOptionalPathTable
;
77 int32M TypeMPathTable
;
78 int32M TypeMOptionalPathTable
;
79 UBYTE RootDirectoryEntry
[34];
80 strD VolumeSetIdentifier
[128];
81 strA PublisherIdentifier
[128];
82 strA DataPreparerIdentifier
[128];
83 strA ApplicationIdentifier
[128];
84 strD CopyrightFileIdentifier
[38];
85 strD AbstractFileIdentifier
[36];
86 strD BibliographicFileIdentifier
[37];
87 ascDate VolumeCreation
;
88 ascDate VolumeModification
;
89 ascDate VolumeExpiration
;
90 ascDate VolumeEffective
;
91 int8 FileStructureVersion
;
93 UBYTE Application
[512];
97 } __packed Terminator
;
101 struct isoPathTable
{
102 int8 DirectoryIdentifierLength
;
103 int8 ExtendedAttributeLength
;
104 int32 ExtentLocation
; /* LBA */
105 int16 ParentDirectory
;
106 strD DirectoryIdentifier
[0]; /* Padded to an even number */
109 struct isoDirectory
{
110 int8 DirectoryLength
;
111 int8 ExtendedAttributeLength
;
112 int32LM ExtentLocation
; /* LBA */
113 int32LM DataLength
; /* In bytes */
114 binDate RecordingDate
;
116 #define ISO_Directory_HIDDEN (1 << 0) /* Hidden file */
117 #define ISO_Directory_ISDIR (1 << 1) /* Is a directrory node */
118 #define ISO_Directory_ASSOC (1 << 2) /* Associated File */
119 #define ISO_Directory_EXTFORMAT (1 << 3) /* Extended Attribute has format info */
120 #define ISO_Directory_EXTPERM (1 << 4) /* Extended Attribute has permission info */
121 #define ISO_Directory_CONTINUED (1 << 5) /* File continued in another entry */
124 int16LM VolumeSequence
;
125 int8 FileIdentifierLength
;
126 strD FileIdentifier
[0]; /* Padded to an even length */
127 /* System Use area follows the FileIdentifier */
130 /* Rock-Ridge and Amiga extensions */
133 int16 Signature
; /* Always treat as MSB */
137 #define RR_SystemUse_SP 0x5350 /* System Use Sharing Protocol */
138 #define RR_SystemUse_SP_VERSION 1
140 UBYTE CheckBytes
[2]; /* 0xBE 0xEF */
143 #define RR_SystemUse_ST 0x5354 /* System Use Sharing Termination */
144 #define RR_SystemUse_ST_VERSION 1
147 #define RR_SystemUse_CE 0x4345 /* Continuation Entry */
148 #define RR_SystemUse_CE_VERSION 1
154 #define RR_SystemUse_ER 0x4552 /* Extension Reference */
155 #define RR_SystemUse_ER_VERSION 1
157 int8 IdentifierLength
; /* LEN_ID */
158 int8 DescriptorLength
; /* LEN_DES */
159 int8 SourceLength
; /* LEN_SRC */
160 int8 ExtensionVersion
; /* EXT_VER */
161 UBYTE Data
[0]; /* LEN_ID + LEN_DES + LEN_SRC */
163 #define RR_SystemUse_AS 0x4153 /* Amiga */
164 #define RR_SystemUse_AS_VERSION 1
167 #define RR_AS_PROTECTION (1 << 0) /* Protection bits present */
168 #define RR_AS_COMMENT (1 << 1) /* Comment field present */
169 #define RR_AS_COMMENT_CONTINUE (1 << 2) /* Comment continues in next SUA */
172 #define RR_SystemUse_RR 0x5252 /* RockRidge capabilities */
173 #define RR_SystemUse_RR_VERSION 1
176 #define RR_RR_FLAGS_PX (1 << 0) /* PX Flag is valid */
177 #define RR_RR_FLAGS_PN (1 << 0) /* PX Flag is valid */
178 #define RR_RR_FLAGS_SL (1 << 0) /* PX Flag is valid */
179 #define RR_RR_FLAGS_NM (1 << 0) /* PX Flag is valid */
180 #define RR_RR_FLAGS_CL (1 << 0) /* PX Flag is valid */
181 #define RR_RR_FLAGS_PL (1 << 0) /* PX Flag is valid */
182 #define RR_RR_FLAGS_RE (1 << 0) /* PX Flag is valid */
183 #define RR_RR_FLAGS_TF (1 << 0) /* PX Flag is valid */
185 #define RR_SystemUse_PX 0x5058 /* POSIX */
186 #define RR_SystemUse_PX_VERSION 1
189 #define S_IRUSR 0000400
190 #define S_IWUSR 0000200
191 #define S_IXUSR 0000100
192 #define S_IRGRP 0000040
193 #define S_IWGRP 0000020
194 #define S_IXGRP 0000010
195 #define S_IROTH 0000004
196 #define S_IWOTH 0000002
197 #define S_IXOTH 0000001
198 #define S_ISUID 0004000
199 #define S_ISGID 0002000
200 #define S_ENFMT 0002000
201 #define S_ISVTX 0001000
202 #define S_IFSOCK 0140000
203 #define S_IFLINK 0120000
204 #define S_IFREG 0100000
205 #define S_IFBLK 0060000
206 #define S_IFCHR 0020000
207 #define S_IFDIR 0040000
208 #define S_IFIFO 0010000
214 #define RR_SystemUse_PN 0x504e
215 #define RR_SystemUse_PN_VERISON 1
220 #define RR_SystemUse_SL 0x534c
221 #define RR_SystemUse_SL_VERSION 1
224 #define RR_SL_CONTINUE (1 << 0)
227 struct rrSL_Component
{
229 #define RR_SL_COMPONENT_CONTINUE (1 << 0)
230 #define RR_SL_COMPONENT_CURRENT (1 << 1)
231 #define RR_SL_COMPONENT_PARENT (1 << 2)
232 #define RR_SL_COMPONENT_ROOT (1 << 3)
233 #define RR_SL_COMPONENT_VOLUME (1 << 4) /* Obsolete */
234 #define RR_SL_COMPONENT_HOSTNAME (1 << 5) /* Obsolete */
237 } __packed SL_Component
;
240 #define RR_SystemUse_NM 0x4e4d
241 #define RR_SystemUse_NM_VERSION 1
244 #define RR_NM_COMPONENT_CONTINUE (1 << 0)
245 #define RR_NM_COMPONENT_CURRENT (1 << 1)
246 #define RR_NM_COMPONENT_PARENT (1 << 2)
249 #define RR_SystemUse_CL 0x434c
250 #define RR_SystemUse_CL_VERSION 1
252 int32LM ChildDirectory
; /* LBA */
254 #define RR_SystemUse_PL 0x504c
255 #define RR_SystemUse_PL_VERSION 1
257 int32LM ParentDirectory
; /* LBA */
259 #define RR_SystemUse_RE 0x524c
260 #define RR_SystemUse_RE_VERSION 1
263 #define RR_SystemUse_TF 0x5446
264 #define RR_SystemUse_TF_VERSION 1
267 #define RR_TF_CREATION (1 << 0)
268 #define RR_TF_MODIFY (1 << 1)
269 #define RR_TF_ACCESS (1 << 2)
270 #define RR_TF_ATTRIBUTES (1 << 3)
271 #define RR_TF_BACKUP (1 << 4)
272 #define RR_TF_EXPIRATION (1 << 5)
273 #define RR_TF_EFFECTIVE (1 << 6)
274 #define RR_TF_LONG_FORM (1 << 7)
275 UBYTE Data
[]; /* Array of ascDate or binDate format */
277 #define RR_SystemUse_SF 0x5346
278 #define RR_SystemUse_SF_VERSION 1
280 int32LM st_size_High
;
288 struct rrSparseFileTable
{
289 int32LM TableEntry
[256];
290 #define RR_SFT_BLOCK(x) ((x) & 0x00ffffff) /* LBA */
291 #define RR_SFT_TABLE (1 << 30)
292 #define RR_SFT_EMPTY (1 << 31)
297 struct SystemUseASProtection
{
304 struct SystemUseASComment
{
309 extern const struct CDFSOps ISO9660_Ops
;
311 #endif /* ISO9660_H */