]>
Commit | Line | Data |
---|---|---|
012771d8 WD |
1 | /* |
2 | * (C) Copyright 2001 | |
3 | * Denis Peter, MPL AG Switzerland, d.peter@mpl.ch. | |
4 | * | |
3765b3e7 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
012771d8 WD |
6 | */ |
7 | #ifndef _PART_CD_H | |
8 | #define _PART_CD_H | |
9 | ||
10 | #define BRVD 0x11 | |
11 | #define PVD_OFFSET 0x10 | |
12 | ||
13 | ||
14 | typedef struct iso_boot_rec { | |
15 | unsigned char desctype; /* type of Volume descriptor: 0 = boot record, 1 = primary, 2 = Supplement, 3 = volume part 0xff trminator */ | |
16 | unsigned char stand_ident[5]; /* "CD001" */ | |
17 | unsigned char vers; /* Version */ | |
18 | char ident_str[0x20]; /* Ident String "EL TORITO SPECIFICATION" */ | |
19 | unsigned char unused[0x20]; /* unused */ | |
20 | unsigned char pointer[4]; /* absolute pointer to Boot Catalog */ | |
21 | } iso_boot_rec_t; | |
22 | ||
23 | ||
24 | typedef struct iso_pri_rec { | |
25 | unsigned char desctype; /* type of Volume descriptor: 0 = boot record, 1 = primary, 2 = Supplement, 3 = volume part 0xff trminator */ | |
26 | unsigned char stand_ident[5]; /* "CD001" */ | |
27 | unsigned char vers; /* Version */ | |
53677ef1 WD |
28 | unsigned char unused; |
29 | char sysid[32]; /* system Identifier */ | |
012771d8 WD |
30 | char volid[32]; /* volume Identifier */ |
31 | unsigned char zeros1[8]; /* unused */ | |
ef9e6de5 AG |
32 | unsigned int volsiz_LE; /* volume size Little Endian */ |
33 | unsigned int volsiz_BE; /* volume size Big Endian */ | |
012771d8 WD |
34 | unsigned char zeros2[32]; /* unused */ |
35 | unsigned short setsize_LE; /* volume set size LE */ | |
36 | unsigned short setsize_BE; /* volume set size BE */ | |
37 | unsigned short seqnum_LE; /* volume sequence number LE */ | |
38 | unsigned short seqnum_BE; /* volume sequence number BE */ | |
39 | unsigned short secsize_LE; /* sector size LE */ | |
40 | unsigned short secsize_BE; /* sector size BE */ | |
ef9e6de5 AG |
41 | unsigned int pathtablen_LE;/* Path Table size LE */ |
42 | unsigned int pathtablen_BE;/* Path Table size BE */ | |
43 | unsigned int firstsek_LEpathtab1_LE; /* location of first occurrence of little endian type path table */ | |
44 | unsigned int firstsek_LEpathtab2_LE; /* location of optional occurrence of little endian type path table */ | |
45 | unsigned int firstsek_BEpathtab1_BE; /* location of first occurrence of big endian type path table */ | |
46 | unsigned int firstsek_BEpathtab2_BE; /* location of optional occurrence of big endian type path table */ | |
53677ef1 WD |
47 | unsigned char rootdir[34]; /* directory record for root dir */ |
48 | char volsetid[128];/* Volume set identifier */ | |
49 | char pubid[128]; /* Publisher identifier */ | |
50 | char dataprepid[128]; /* data preparer identifier */ | |
51 | char appid[128]; /* application identifier */ | |
52 | char copyr[37]; /* copyright string */ | |
53 | char abstractfileid[37]; /* abstract file identifier */ | |
54 | char bibliofileid[37]; /* bibliographic file identifier */ | |
55 | unsigned char creationdate[17]; /* creation date */ | |
56 | unsigned char modify[17]; /* modification date */ | |
57 | unsigned char expire[17]; /* expiring date */ | |
58 | unsigned char effective[17];/* effective date */ | |
59 | unsigned char filestruc_ver; /* file structur version */ | |
012771d8 WD |
60 | } iso_pri_rec_t; |
61 | ||
62 | typedef struct iso_sup_rec { | |
63 | unsigned char desctype; /* type of Volume descriptor: 0 = boot record, 1 = primary, 2 = Supplement, 3 = volume part 0xff trminator */ | |
64 | unsigned char stand_ident[5]; /* "CD001" */ | |
65 | unsigned char vers; /* Version */ | |
53677ef1 WD |
66 | unsigned char volumeflags; /* if bit 0 = 0 => all escape sequences are according ISO 2375 */ |
67 | char sysid[32]; /* system Identifier */ | |
012771d8 WD |
68 | char volid[32]; /* volume Identifier */ |
69 | unsigned char zeros1[8]; /* unused */ | |
ef9e6de5 AG |
70 | unsigned int volsiz_LE; /* volume size Little Endian */ |
71 | unsigned int volsiz_BE; /* volume size Big Endian */ | |
53677ef1 | 72 | unsigned char escapeseq[32];/* Escape sequences */ |
012771d8 | 73 | unsigned short setsize_LE; /* volume set size LE */ |
53677ef1 WD |
74 | unsigned short setsize_BE; /* volume set size BE */ |
75 | unsigned short seqnum_LE; /* volume sequence number LE */ | |
76 | unsigned short seqnum_BE; /* volume sequence number BE */ | |
77 | unsigned short secsize_LE; /* sector size LE */ | |
78 | unsigned short secsize_BE; /* sector size BE */ | |
ef9e6de5 AG |
79 | unsigned int pathtablen_LE;/* Path Table size LE */ |
80 | unsigned int pathtablen_BE;/* Path Table size BE */ | |
81 | unsigned int firstsek_LEpathtab1_LE; /* location of first occurrence of little endian type path table */ | |
82 | unsigned int firstsek_LEpathtab2_LE; /* location of optional occurrence of little endian type path table */ | |
83 | unsigned int firstsek_BEpathtab1_BE; /* location of first occurrence of big endian type path table */ | |
84 | unsigned int firstsek_BEpathtab2_BE; /* location of optional occurrence of big endian type path table */ | |
53677ef1 WD |
85 | unsigned char rootdir[34]; /* directory record for root dir */ |
86 | char volsetid[128];/* Volume set identifier */ | |
87 | char pubid[128]; /* Publisher identifier */ | |
88 | char dataprepid[128]; /* data preparer identifier */ | |
89 | char appid[128]; /* application identifier */ | |
90 | char copyr[37]; /* copyright string */ | |
91 | char abstractfileid[37]; /* abstract file identifier */ | |
92 | char bibliofileid[37]; /* bibliographic file identifier */ | |
93 | unsigned char creationdate[17]; /* creation date */ | |
94 | unsigned char modify[17]; /* modification date */ | |
95 | unsigned char expire[17]; /* expiring date */ | |
96 | unsigned char effective[17];/* effective date */ | |
97 | unsigned char filestruc_ver; /* file structur version */ | |
012771d8 WD |
98 | }iso_sup_rec_t; |
99 | ||
100 | typedef struct iso_part_rec { | |
101 | unsigned char desctype; /* type of Volume descriptor: 0 = boot record, 1 = primary, 2 = Supplement, 3 = volume part 0xff trminator */ | |
102 | unsigned char stand_ident[5]; /* "CD001" */ | |
103 | unsigned char vers; /* Version */ | |
53677ef1 WD |
104 | unsigned char unused; |
105 | char sysid[32]; /* system Identifier */ | |
106 | char volid[32]; /* volume partition Identifier */ | |
ef9e6de5 AG |
107 | unsigned int partloc_LE; /* volume partition location LE */ |
108 | unsigned int partloc_BE; /* volume partition location BE */ | |
109 | unsigned int partsiz_LE; /* volume partition size LE */ | |
110 | unsigned int partsiz_BE; /* volume partition size BE */ | |
012771d8 WD |
111 | }iso_part_rec_t; |
112 | ||
113 | ||
012771d8 WD |
114 | typedef struct iso_val_entry { |
115 | unsigned char header_id; /* Header ID must be 0x01 */ | |
116 | unsigned char platform; /* Platform: 0=x86, 1=PowerPC, 2=MAC */ | |
117 | unsigned char res[2]; /* reserved */ | |
53677ef1 WD |
118 | char manu_str[0x18]; /* Ident String of manufacturer/developer */ |
119 | unsigned char chk_sum[2]; /* Check sum (all words must be zero) */ | |
012771d8 WD |
120 | unsigned char key[2]; /* key[0]=55, key[1]=0xAA */ |
121 | } iso_val_entry_t; | |
122 | ||
123 | typedef struct iso_header_entry { | |
124 | unsigned char header_id; /* Header ID must be 0x90 or 0x91 */ | |
125 | unsigned char platform; /* Platform: 0=x86, 1=PowerPC, 2=MAC */ | |
126 | unsigned char numentry[2]; /* number of entries */ | |
53677ef1 | 127 | char id_str[0x1C]; /* Ident String of sectionr */ |
012771d8 WD |
128 | } iso_header_entry_t; |
129 | ||
130 | ||
131 | typedef struct iso_init_def_entry { | |
132 | unsigned char boot_ind; /* Boot indicator 0x88=bootable 0=not bootable */ | |
133 | unsigned char boot_media; /* boot Media Type: 0=no Emulation, 1=1.2MB floppy, 2=1.44MB floppy, 3=2.88MB floppy 4=hd (0x80) */ | |
134 | unsigned char ld_seg[2]; /* Load segment (flat model=addr/10) */ | |
53677ef1 | 135 | unsigned char systype; /* System Type copy of byte5 of part table */ |
012771d8 WD |
136 | unsigned char res; /* reserved */ |
137 | unsigned char sec_cnt[2]; /* sector count in VIRTUAL Blocks (0x200) */ | |
138 | unsigned char rel_block_addr[4]; /* relative Block address */ | |
139 | } iso_init_def_entry_t; | |
140 | ||
141 | ||
142 | void print_partition_cd(int dev); | |
143 | ||
012771d8 | 144 | #endif /* _PART_CD_H */ |