2 * iso9660 - An iso9660 CDI driver with Rockridge support
4 * Copyright (C) 2008 Janosch Gräf
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 3 of the License, or (at your option)
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef _DIRECTORY_RECORD_H_
21 #define _DIRECTORY_RECORD_H_
25 // Date from ISO9660 directory entry
26 struct iso9660_dirrec_date
{
27 // Number of years since 1900
30 // Month (1=January, 2=February)
45 // GMT offset (in 15min intervals)
47 } __attribute__ ((packed
));
49 #define ISO9660_DIRREC_HIDDEN 1
50 #define ISO9660_DIRREC_DIR 2
51 #define ISO9660_DIRREC_ASSOC 4
52 #define ISO9660_DIRREC_RECFMT 8
53 #define ISO9660_DIRREC_PERM 16
54 #define ISO9660_DIRREC_NOTFINAL 128
56 // ISO9660 directory entry
57 struct iso9660_dirrec
{
58 // Size of this record (must be even)
61 // Number of sectors in extended attribute record
62 uint8_t num_sectors_extattrrec
;
64 // First sector for file/directory data (0 if empty)
66 uint32_t data_sector_be
;
68 // File/directory data size
70 uint32_t data_size_be
;
73 struct iso9660_dirrec_date date_creation
;
78 // Unit size for interleaved files (should be 0)
79 uint8_t interleaved_unit_size
;
81 // Gap size for interleaved files (should be 0)
82 uint8_t interleaved_gap_size
;
84 // Volume sequence number
86 uint16_t volume_seq_be
;
89 uint8_t identifier_length
;
92 uint8_t identifier
[1];
93 } __attribute__ ((packed
));