~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/iso_fs.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef _ISOFS_FS_H
  3 #define _ISOFS_FS_H
  4 
  5 #include <linux/types.h>
  6 #include <linux/magic.h>
  7 
  8 /*
  9  * The isofs filesystem constants/structures
 10  */
 11 
 12 /* This part borrowed from the bsd386 isofs */
 13 #define ISODCL(from, to) (to - from + 1)
 14 
 15 struct iso_volume_descriptor {
 16         __u8 type[ISODCL(1,1)]; /* 711 */
 17         char id[ISODCL(2,6)];
 18         __u8 version[ISODCL(7,7)];
 19         __u8 data[ISODCL(8,2048)];
 20 };
 21 
 22 /* volume descriptor types */
 23 #define ISO_VD_PRIMARY 1
 24 #define ISO_VD_SUPPLEMENTARY 2
 25 #define ISO_VD_END 255
 26 
 27 #define ISO_STANDARD_ID "CD001"
 28 
 29 struct iso_primary_descriptor {
 30         __u8 type                       [ISODCL (  1,   1)]; /* 711 */
 31         char id                         [ISODCL (  2,   6)];
 32         __u8 version                    [ISODCL (  7,   7)]; /* 711 */
 33         __u8 unused1                    [ISODCL (  8,   8)];
 34         char system_id                  [ISODCL (  9,  40)]; /* achars */
 35         char volume_id                  [ISODCL ( 41,  72)]; /* dchars */
 36         __u8 unused2                    [ISODCL ( 73,  80)];
 37         __u8 volume_space_size          [ISODCL ( 81,  88)]; /* 733 */
 38         __u8 unused3                    [ISODCL ( 89, 120)];
 39         __u8 volume_set_size            [ISODCL (121, 124)]; /* 723 */
 40         __u8 volume_sequence_number     [ISODCL (125, 128)]; /* 723 */
 41         __u8 logical_block_size         [ISODCL (129, 132)]; /* 723 */
 42         __u8 path_table_size            [ISODCL (133, 140)]; /* 733 */
 43         __u8 type_l_path_table          [ISODCL (141, 144)]; /* 731 */
 44         __u8 opt_type_l_path_table      [ISODCL (145, 148)]; /* 731 */
 45         __u8 type_m_path_table          [ISODCL (149, 152)]; /* 732 */
 46         __u8 opt_type_m_path_table      [ISODCL (153, 156)]; /* 732 */
 47         __u8 root_directory_record      [ISODCL (157, 190)]; /* 9.1 */
 48         char volume_set_id              [ISODCL (191, 318)]; /* dchars */
 49         char publisher_id               [ISODCL (319, 446)]; /* achars */
 50         char preparer_id                [ISODCL (447, 574)]; /* achars */
 51         char application_id             [ISODCL (575, 702)]; /* achars */
 52         char copyright_file_id          [ISODCL (703, 739)]; /* 7.5 dchars */
 53         char abstract_file_id           [ISODCL (740, 776)]; /* 7.5 dchars */
 54         char bibliographic_file_id      [ISODCL (777, 813)]; /* 7.5 dchars */
 55         __u8 creation_date              [ISODCL (814, 830)]; /* 8.4.26.1 */
 56         __u8 modification_date          [ISODCL (831, 847)]; /* 8.4.26.1 */
 57         __u8 expiration_date            [ISODCL (848, 864)]; /* 8.4.26.1 */
 58         __u8 effective_date             [ISODCL (865, 881)]; /* 8.4.26.1 */
 59         __u8 file_structure_version     [ISODCL (882, 882)]; /* 711 */
 60         __u8 unused4                    [ISODCL (883, 883)];
 61         __u8 application_data           [ISODCL (884, 1395)];
 62         __u8 unused5                    [ISODCL (1396, 2048)];
 63 };
 64 
 65 /* Almost the same as the primary descriptor but two fields are specified */
 66 struct iso_supplementary_descriptor {
 67         __u8 type                       [ISODCL (  1,   1)]; /* 711 */
 68         char id                         [ISODCL (  2,   6)];
 69         __u8 version                    [ISODCL (  7,   7)]; /* 711 */
 70         __u8 flags                      [ISODCL (  8,   8)]; /* 853 */
 71         char system_id                  [ISODCL (  9,  40)]; /* achars */
 72         char volume_id                  [ISODCL ( 41,  72)]; /* dchars */
 73         __u8 unused2                    [ISODCL ( 73,  80)];
 74         __u8 volume_space_size          [ISODCL ( 81,  88)]; /* 733 */
 75         __u8 escape                     [ISODCL ( 89, 120)]; /* 856 */
 76         __u8 volume_set_size            [ISODCL (121, 124)]; /* 723 */
 77         __u8 volume_sequence_number     [ISODCL (125, 128)]; /* 723 */
 78         __u8 logical_block_size         [ISODCL (129, 132)]; /* 723 */
 79         __u8 path_table_size            [ISODCL (133, 140)]; /* 733 */
 80         __u8 type_l_path_table          [ISODCL (141, 144)]; /* 731 */
 81         __u8 opt_type_l_path_table      [ISODCL (145, 148)]; /* 731 */
 82         __u8 type_m_path_table          [ISODCL (149, 152)]; /* 732 */
 83         __u8 opt_type_m_path_table      [ISODCL (153, 156)]; /* 732 */
 84         __u8 root_directory_record      [ISODCL (157, 190)]; /* 9.1 */
 85         char volume_set_id              [ISODCL (191, 318)]; /* dchars */
 86         char publisher_id               [ISODCL (319, 446)]; /* achars */
 87         char preparer_id                [ISODCL (447, 574)]; /* achars */
 88         char application_id             [ISODCL (575, 702)]; /* achars */
 89         char copyright_file_id          [ISODCL (703, 739)]; /* 7.5 dchars */
 90         char abstract_file_id           [ISODCL (740, 776)]; /* 7.5 dchars */
 91         char bibliographic_file_id      [ISODCL (777, 813)]; /* 7.5 dchars */
 92         __u8 creation_date              [ISODCL (814, 830)]; /* 8.4.26.1 */
 93         __u8 modification_date          [ISODCL (831, 847)]; /* 8.4.26.1 */
 94         __u8 expiration_date            [ISODCL (848, 864)]; /* 8.4.26.1 */
 95         __u8 effective_date             [ISODCL (865, 881)]; /* 8.4.26.1 */
 96         __u8 file_structure_version     [ISODCL (882, 882)]; /* 711 */
 97         __u8 unused4                    [ISODCL (883, 883)];
 98         __u8 application_data           [ISODCL (884, 1395)];
 99         __u8 unused5                    [ISODCL (1396, 2048)];
100 };
101 
102 
103 #define HS_STANDARD_ID "CDROM"
104 
105 struct  hs_volume_descriptor {
106         __u8 foo                        [ISODCL (  1,   8)]; /* 733 */
107         __u8 type                       [ISODCL (  9,   9)]; /* 711 */
108         char id                         [ISODCL ( 10,  14)];
109         __u8 version                    [ISODCL ( 15,  15)]; /* 711 */
110         __u8 data[ISODCL(16,2048)];
111 };
112 
113 
114 struct hs_primary_descriptor {
115         __u8 foo                        [ISODCL (  1,   8)]; /* 733 */
116         __u8 type                       [ISODCL (  9,   9)]; /* 711 */
117         __u8 id                         [ISODCL ( 10,  14)];
118         __u8 version                    [ISODCL ( 15,  15)]; /* 711 */
119         __u8 unused1                    [ISODCL ( 16,  16)]; /* 711 */
120         char system_id                  [ISODCL ( 17,  48)]; /* achars */
121         char volume_id                  [ISODCL ( 49,  80)]; /* dchars */
122         __u8 unused2                    [ISODCL ( 81,  88)]; /* 733 */
123         __u8 volume_space_size          [ISODCL ( 89,  96)]; /* 733 */
124         __u8 unused3                    [ISODCL ( 97, 128)]; /* 733 */
125         __u8 volume_set_size            [ISODCL (129, 132)]; /* 723 */
126         __u8 volume_sequence_number     [ISODCL (133, 136)]; /* 723 */
127         __u8 logical_block_size         [ISODCL (137, 140)]; /* 723 */
128         __u8 path_table_size            [ISODCL (141, 148)]; /* 733 */
129         __u8 type_l_path_table          [ISODCL (149, 152)]; /* 731 */
130         __u8 unused4                    [ISODCL (153, 180)]; /* 733 */
131         __u8 root_directory_record      [ISODCL (181, 214)]; /* 9.1 */
132 };
133 
134 /* We use this to help us look up the parent inode numbers. */
135 
136 struct iso_path_table{
137         __u8  name_len[2];      /* 721 */
138         __u8  extent[4];        /* 731 */
139         __u8  parent[2];        /* 721 */
140         char name[];
141 } __attribute__((packed));
142 
143 /* high sierra is identical to iso, except that the date is only 6 bytes, and
144    there is an extra reserved byte after the flags */
145 
146 struct iso_directory_record {
147         __u8 length                     [ISODCL (1, 1)]; /* 711 */
148         __u8 ext_attr_length            [ISODCL (2, 2)]; /* 711 */
149         __u8 extent                     [ISODCL (3, 10)]; /* 733 */
150         __u8 size                       [ISODCL (11, 18)]; /* 733 */
151         __u8 date                       [ISODCL (19, 25)]; /* 7 by 711 */
152         __u8 flags                      [ISODCL (26, 26)];
153         __u8 file_unit_size             [ISODCL (27, 27)]; /* 711 */
154         __u8 interleave                 [ISODCL (28, 28)]; /* 711 */
155         __u8 volume_sequence_number     [ISODCL (29, 32)]; /* 723 */
156         __u8 name_len                   [ISODCL (33, 33)]; /* 711 */
157         char name                       [];
158 } __attribute__((packed));
159 
160 #define ISOFS_BLOCK_BITS 11
161 #define ISOFS_BLOCK_SIZE 2048
162 
163 #define ISOFS_BUFFER_SIZE(INODE) ((INODE)->i_sb->s_blocksize)
164 #define ISOFS_BUFFER_BITS(INODE) ((INODE)->i_sb->s_blocksize_bits)
165 
166 #endif /* _ISOFS_FS_H */
167 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php