blob: 82270316727aba8e6ba9378464cb9b3f28d1a5c3 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _ISOFS_FS_H
20#define _ISOFS_FS_H
21#include <linux/types.h>
22#include <linux/magic.h>
Tao Baod7db5942015-01-28 10:07:51 -080023#define ISODCL(from,to) (to - from + 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070024struct iso_volume_descriptor {
Christopher Ferris934ec942018-01-31 15:29:16 -080025 __u8 type[ISODCL(1, 1)];
Tao Baod7db5942015-01-28 10:07:51 -080026 char id[ISODCL(2, 6)];
Christopher Ferris934ec942018-01-31 15:29:16 -080027 __u8 version[ISODCL(7, 7)];
28 __u8 data[ISODCL(8, 2048)];
Ben Cheng655a7c02013-10-16 16:09:24 -070029};
30#define ISO_VD_PRIMARY 1
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define ISO_VD_SUPPLEMENTARY 2
32#define ISO_VD_END 255
33#define ISO_STANDARD_ID "CD001"
34struct iso_primary_descriptor {
Christopher Ferris934ec942018-01-31 15:29:16 -080035 __u8 type[ISODCL(1, 1)];
Tao Baod7db5942015-01-28 10:07:51 -080036 char id[ISODCL(2, 6)];
Christopher Ferris934ec942018-01-31 15:29:16 -080037 __u8 version[ISODCL(7, 7)];
38 __u8 unused1[ISODCL(8, 8)];
Tao Baod7db5942015-01-28 10:07:51 -080039 char system_id[ISODCL(9, 40)];
40 char volume_id[ISODCL(41, 72)];
Christopher Ferris934ec942018-01-31 15:29:16 -080041 __u8 unused2[ISODCL(73, 80)];
42 __u8 volume_space_size[ISODCL(81, 88)];
43 __u8 unused3[ISODCL(89, 120)];
44 __u8 volume_set_size[ISODCL(121, 124)];
45 __u8 volume_sequence_number[ISODCL(125, 128)];
46 __u8 logical_block_size[ISODCL(129, 132)];
47 __u8 path_table_size[ISODCL(133, 140)];
48 __u8 type_l_path_table[ISODCL(141, 144)];
49 __u8 opt_type_l_path_table[ISODCL(145, 148)];
50 __u8 type_m_path_table[ISODCL(149, 152)];
51 __u8 opt_type_m_path_table[ISODCL(153, 156)];
52 __u8 root_directory_record[ISODCL(157, 190)];
Tao Baod7db5942015-01-28 10:07:51 -080053 char volume_set_id[ISODCL(191, 318)];
54 char publisher_id[ISODCL(319, 446)];
Tao Baod7db5942015-01-28 10:07:51 -080055 char preparer_id[ISODCL(447, 574)];
56 char application_id[ISODCL(575, 702)];
57 char copyright_file_id[ISODCL(703, 739)];
58 char abstract_file_id[ISODCL(740, 776)];
Tao Baod7db5942015-01-28 10:07:51 -080059 char bibliographic_file_id[ISODCL(777, 813)];
Christopher Ferris934ec942018-01-31 15:29:16 -080060 __u8 creation_date[ISODCL(814, 830)];
61 __u8 modification_date[ISODCL(831, 847)];
62 __u8 expiration_date[ISODCL(848, 864)];
63 __u8 effective_date[ISODCL(865, 881)];
64 __u8 file_structure_version[ISODCL(882, 882)];
65 __u8 unused4[ISODCL(883, 883)];
66 __u8 application_data[ISODCL(884, 1395)];
67 __u8 unused5[ISODCL(1396, 2048)];
Ben Cheng655a7c02013-10-16 16:09:24 -070068};
69struct iso_supplementary_descriptor {
Christopher Ferris934ec942018-01-31 15:29:16 -080070 __u8 type[ISODCL(1, 1)];
Tao Baod7db5942015-01-28 10:07:51 -080071 char id[ISODCL(2, 6)];
Christopher Ferris934ec942018-01-31 15:29:16 -080072 __u8 version[ISODCL(7, 7)];
73 __u8 flags[ISODCL(8, 8)];
Tao Baod7db5942015-01-28 10:07:51 -080074 char system_id[ISODCL(9, 40)];
Tao Baod7db5942015-01-28 10:07:51 -080075 char volume_id[ISODCL(41, 72)];
Christopher Ferris934ec942018-01-31 15:29:16 -080076 __u8 unused2[ISODCL(73, 80)];
77 __u8 volume_space_size[ISODCL(81, 88)];
78 __u8 escape[ISODCL(89, 120)];
79 __u8 volume_set_size[ISODCL(121, 124)];
80 __u8 volume_sequence_number[ISODCL(125, 128)];
81 __u8 logical_block_size[ISODCL(129, 132)];
82 __u8 path_table_size[ISODCL(133, 140)];
83 __u8 type_l_path_table[ISODCL(141, 144)];
84 __u8 opt_type_l_path_table[ISODCL(145, 148)];
85 __u8 type_m_path_table[ISODCL(149, 152)];
86 __u8 opt_type_m_path_table[ISODCL(153, 156)];
87 __u8 root_directory_record[ISODCL(157, 190)];
Tao Baod7db5942015-01-28 10:07:51 -080088 char volume_set_id[ISODCL(191, 318)];
89 char publisher_id[ISODCL(319, 446)];
90 char preparer_id[ISODCL(447, 574)];
Tao Baod7db5942015-01-28 10:07:51 -080091 char application_id[ISODCL(575, 702)];
92 char copyright_file_id[ISODCL(703, 739)];
93 char abstract_file_id[ISODCL(740, 776)];
94 char bibliographic_file_id[ISODCL(777, 813)];
Christopher Ferris934ec942018-01-31 15:29:16 -080095 __u8 creation_date[ISODCL(814, 830)];
96 __u8 modification_date[ISODCL(831, 847)];
97 __u8 expiration_date[ISODCL(848, 864)];
98 __u8 effective_date[ISODCL(865, 881)];
99 __u8 file_structure_version[ISODCL(882, 882)];
100 __u8 unused4[ISODCL(883, 883)];
101 __u8 application_data[ISODCL(884, 1395)];
102 __u8 unused5[ISODCL(1396, 2048)];
Ben Cheng655a7c02013-10-16 16:09:24 -0700103};
104#define HS_STANDARD_ID "CDROM"
105struct hs_volume_descriptor {
Christopher Ferris934ec942018-01-31 15:29:16 -0800106 __u8 foo[ISODCL(1, 8)];
107 __u8 type[ISODCL(9, 9)];
Tao Baod7db5942015-01-28 10:07:51 -0800108 char id[ISODCL(10, 14)];
Christopher Ferris934ec942018-01-31 15:29:16 -0800109 __u8 version[ISODCL(15, 15)];
110 __u8 data[ISODCL(16, 2048)];
Ben Cheng655a7c02013-10-16 16:09:24 -0700111};
112struct hs_primary_descriptor {
Christopher Ferris934ec942018-01-31 15:29:16 -0800113 __u8 foo[ISODCL(1, 8)];
114 __u8 type[ISODCL(9, 9)];
115 __u8 id[ISODCL(10, 14)];
116 __u8 version[ISODCL(15, 15)];
117 __u8 unused1[ISODCL(16, 16)];
Tao Baod7db5942015-01-28 10:07:51 -0800118 char system_id[ISODCL(17, 48)];
Tao Baod7db5942015-01-28 10:07:51 -0800119 char volume_id[ISODCL(49, 80)];
Christopher Ferris934ec942018-01-31 15:29:16 -0800120 __u8 unused2[ISODCL(81, 88)];
121 __u8 volume_space_size[ISODCL(89, 96)];
122 __u8 unused3[ISODCL(97, 128)];
123 __u8 volume_set_size[ISODCL(129, 132)];
124 __u8 volume_sequence_number[ISODCL(133, 136)];
125 __u8 logical_block_size[ISODCL(137, 140)];
126 __u8 path_table_size[ISODCL(141, 148)];
127 __u8 type_l_path_table[ISODCL(149, 152)];
128 __u8 unused4[ISODCL(153, 180)];
129 __u8 root_directory_record[ISODCL(181, 214)];
Ben Cheng655a7c02013-10-16 16:09:24 -0700130};
Tao Baod7db5942015-01-28 10:07:51 -0800131struct iso_path_table {
Christopher Ferris934ec942018-01-31 15:29:16 -0800132 __u8 name_len[2];
133 __u8 extent[4];
134 __u8 parent[2];
Tao Baod7db5942015-01-28 10:07:51 -0800135 char name[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700136} __attribute__((packed));
137struct iso_directory_record {
Christopher Ferris934ec942018-01-31 15:29:16 -0800138 __u8 length[ISODCL(1, 1)];
139 __u8 ext_attr_length[ISODCL(2, 2)];
140 __u8 extent[ISODCL(3, 10)];
141 __u8 size[ISODCL(11, 18)];
142 __u8 date[ISODCL(19, 25)];
143 __u8 flags[ISODCL(26, 26)];
144 __u8 file_unit_size[ISODCL(27, 27)];
145 __u8 interleave[ISODCL(28, 28)];
146 __u8 volume_sequence_number[ISODCL(29, 32)];
147 __u8 name_len[ISODCL(33, 33)];
Tao Baod7db5942015-01-28 10:07:51 -0800148 char name[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700149} __attribute__((packed));
150#define ISOFS_BLOCK_BITS 11
Ben Cheng655a7c02013-10-16 16:09:24 -0700151#define ISOFS_BLOCK_SIZE 2048
152#define ISOFS_BUFFER_SIZE(INODE) ((INODE)->i_sb->s_blocksize)
153#define ISOFS_BUFFER_BITS(INODE) ((INODE)->i_sb->s_blocksize_bits)
154#endif