udftools

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ide-pc.h
Go to the documentation of this file.
1 /* ide-pc.h
2 *
3 * PURPOSE
4 * Header file for programs using ide-pc.c defined routines
5 *
6 * COPYRIGHT
7 * This file is distributed under the terms of the GNU General Public
8 * License (GPL). Copies of the GPL can be obtained from:
9 * ftp://prep.ai.mit.edu/pub/gnu/GPL
10 * Each contributing author retains all rights to their own work.
11 *
12 * (C) 2001 Enno Fennema
13 *
14 * HISTORY
15 * 16 Aug 01 ef Created.
16 *
17 */
18
19 #ifndef _IDE_PC_H
20 #define _IDE_PC_H
21
22 #include <sys/types.h>
23
24 struct cdrom_inquiry {
25 u_char type : 5; /* 0 */
26 #define INQ_WORM 4
27 #define INQ_CDROM 5
28 u_char qualifier : 3; /* 0 */
29
30 u_char type_modifier : 7; /* 1 */
31 u_char removable : 1; /* 1 */
32
33 u_char ansi_version : 3; /* 2 */
34 u_char ecma_version : 3; /* 2 */
35 u_char iso_version : 2; /* 2 */
36
37 u_char data_format : 4; /* 3 */
38 u_char res3_54 : 2; /* 3 */
39 u_char termiop : 1; /* 3 */
40 u_char aenc : 1; /* 3 */
41
42 u_char add_len : 8; /* 4 */
43 u_char sense_len : 8; /* 5 */ /* only Emulex ??? */
44 u_char res2 : 8; /* 6 */
45
46 u_char softreset : 1; /* 7 */
47 u_char cmdque : 1;
48 u_char res7_2 : 1;
49 u_char linked : 1;
50 u_char sync : 1;
51 u_char wbus16 : 1;
52 u_char wbus32 : 1;
53 u_char reladr : 1; /* 7 */
54
55 char vendor_info[8]; /* 8 */
56 char prod_ident[16]; /* 16 */
57 char prod_revision[4]; /* 32 */
58 char vendor_uniq[20]; /* 36 */
59 char reserved[40]; /* 56 to 96 */
60 };
61
62 struct cdrom_discinfo {
63 u_short data_length;
64 u_char disc_status :2;
65 #define DS_EMPTY 0 /* Empty disk */
66 #define DS_APPENDABLE 1 /* Incomplete disk (appendable) */
67 #define DS_COMPLETE 2 /* Complete disk (closed/no B0 pointer) */
68 u_char session_status :2;
69 #define SS_EMPTY 0 /* Empty session */
70 #define SS_APPENDABLE 1 /* Incomplete session */
71 #define SS_COMPLETE 3 /* Complete session (needs DS_COMPLETE) */
72 u_char erasable:1;
73 u_char _r1 :3;
74
75 u_char trk0;
76 u_char nsessions;
77 u_char trk0_lastsession;
78 u_char trk1_lastsession;
79 u_char _r4 :5;
80 u_char uru :1;
81 u_char dbc_v :1;
82 u_char did_v :1;
83 u_char disc_type;
84 u_char _r9;
85 u_char _r10;
86 u_char _r11;
87 u_int disc_id;
88 u_char latest_leadin_msf[4];
89 u_char last_leadout_msf[4];
90 u_char barcode[8];
91 u_char _r32;
92 u_char n_opc;
93 };
94
95 struct cdrom_trackinfo {
96 u_short data_length;
97 u_char trk;
98 u_char session;
99 u_char _r4;
100 u_char trk_mode :4;
101 u_char copy :1;
102 u_char damage :1;
103 u_char _r5 :2;
104 u_char data_mode :4;
105 u_char fixpkt :1;
106 u_char packet :1;
107 u_char blank :1;
108 u_char rsrvd_trk :1;
109 u_char nwa_v :1;
110 u_char _r7 :7;
111 u_int trk_start;
112 u_int nwa;
113 u_int free_blks;
114 u_int fixpkt_size;
115 u_int trk_size;
116 };
117
118 struct cdrom_buffercapacity {
119 u_short dataLength;
120 u_short rsrvd;
121 u_int totalBufferLength;
122 u_int freeBufferLength;
123 };
124
125 struct cdrom_reccapacity {
126 u_int lastblock;
127 u_int blocksize;
128 };
129
130 struct cdrom_header {
131 u_char datamode;
132 u_char _r234[3];
133 int lba;
134 };
135
136 #define PGCTL_CURRENT_VALUES 0
137 #define PGCTL_CHANGE_MASK 1
138 #define PGCTL_DEFAULT_VALUES 2
139 #define PGCTL_SAVED_VALUES 3
140
141 typedef struct mode_header {
142 u_short data_length; // length excl. this field
143 u_char medium_type;
144 u_char dev_specific;
145 u_short r1;
146 u_short block_desc_length; // 0
147 } mode_hdr;;
148
149 #define GPMODE_READ_ERROR_RECOV_PAGE 0x01 // Read/Write Error Recov in Mt Fuji version
150
151 struct read_error_recovery_params {
152 u_char page_code :6; // 07h
153 u_char _r1 :1;
154 u_char ps :1;
155 u_char length;
156 u_char error_recovery_param;
157 u_char retry_count;
158 u_char _r2[4];
159 };
160
161 #define GPMODE_CACHE_PAGE 0x08 // Cache control page
162
163 struct cdrom_cacheparams {
164 u_char page_code :6; // 08h
165 u_char _r1 :1;
166 u_char ps :1;
167 u_char length;
168 u_char rcd :1;
169 u_char mf :1;
170 u_char wce :1;
171 u_char _r2 :5;
172 u_short dpftl;
173 u_short minpf;
174 u_short maxpf;
175 u_short maxpfceiling;
176 };
177
178
179 struct cdrom_writeparams {
180 u_char page_code :6;
181 u_char _r1 :1;
182 u_char ps :1;
183 u_char page_length;
184
185 u_char write_type :4;
186 u_char test_write :1;
187 u_char _r2 :3;
188
189 u_char trk_mode :4;
190 u_char copy :1;
191 u_char fp :1;
192 u_char multi_session :2;
193 #define MS_NONE 0 /* No B0 pointer. Next session not allowed*/
194 #define MS_FINAL 1 /* B0 = FF:FF:FF. Next session not allowed*/
195 #define MS_MULTI 3 /* B0 = Next PA. Next session allowed */
196
197 u_char data_blk_type :4;
198 #define DB_RAW 0 /* 2352 bytes of raw data */
199 #define DB_RAW_PQ 1 /* 2368 bytes (raw data + P/Q Subchannel) */
200 #define DB_RAW_PW 2 /* 2448 bytes (raw data + P-W Subchannel) */
201 #define DB_RAW_PW_R 3 /* 2448 bytes (raw data + P-W raw Subchannel)*/
202 #define DB_RES_4 4 /* - Reserved */
203 #define DB_RES_5 5 /* - Reserved */
204 #define DB_RES_6 6 /* - Reserved */
205 #define DB_VU_7 7 /* - Vendor specific */
206 #define DB_ROM_MODE1 8 /* 2048 bytes Mode 1 (ISO/IEC 10149) */
207 #define DB_ROM_MODE2 9 /* 2336 bytes Mode 2 (ISO/IEC 10149) */
208 #define DB_XA_F1 10 /* 2048 bytes Mode 2? (CD-ROM XA form 1) */
209 #define DB_XA_F1_8H 11 /* 2056 bytes Mode 2 (CD-ROM XA form 1) + 8 header bytes */
210 #define DB_XA_F2 12 /* 2324 bytes Mode 2 (CD-ROM XA form 2) */
211 #define DB_XA_MODE2_MIX 13 /* 2332 bytes Mode 2 (CD-ROM XA 1/2+subhdr) */
212 #define DB_RES_14 14 /* - Reserved */
213 #define DB_VU_15 15 /* - Vendor specific */
214 u_char _r4 :4;
215
216 u_char _r5;
217 u_char _r6;
218 u_char host_appl_code :6;
219 u_char _r7 :2;
220 u_char session_format;
221 u_char _r9;
222 u_int pkt_size __attribute__ ((packed));
223 u_short audio_pause;
224 u_char mcn[16];
225 u_char isrc[16];
226 u_char subhdr0;
227 u_char subhdr1;
228 u_char subhdr2;
229 u_char subhdr3;
230 };
231
232 struct cdrom_capabilities { /* CD Cap / mech status */
233 u_char p_code : 6;
234 u_char p_res : 1;
235 u_char parsave : 1;
236
237 u_char p_len; /* 0x14 = 20 Bytes */
238
239 u_char cd_r_read : 1; /* Reads CD-R media */
240 u_char cd_rw_read : 1; /* Reads CD-RW media */
241 u_char method2 : 1; /* Reads fixed packet method2 media */
242 u_char dvd_rom_read : 1; /* Reads DVD ROM media */
243 u_char dvd_r_read : 1; /* Reads DVD-R media */
244 u_char dvd_ram_read : 1; /* Reads DVD-RAM media */
245 u_char res_2_67 : 2; /* Reserved */
246
247 u_char cd_r_write : 1; /* Supports writing CD-R media */
248 u_char cd_rw_write : 1; /* Supports writing CD-RW media */
249 u_char test_write : 1; /* Supports emulation write */
250 u_char res_3_3 : 1; /* Reserved */
251 u_char dvd_r_write : 1; /* Supports writing DVD-R media */
252 u_char dvd_ram_write : 1; /* Supports writing DVD-RAM media */
253 u_char res_3_67 : 2; /* Reserved */
254
255 u_char audio_play : 1; /* Supports Audio play operation */
256 u_char composite : 1; /* Deliveres composite A/V stream */
257 u_char digital_port_2 : 1; /* Supports digital output on port 2 */
258 u_char digital_port_1 : 1; /* Supports digital output on port 1 */
259 u_char mode_2_form_1 : 1; /* Reads Mode-2 form 1 media (XA) */
260 u_char mode_2_form_2 : 1; /* Reads Mode-2 form 2 media */
261 u_char multi_session : 1; /* Reads multi-session media */
262 u_char res_4 : 1; /* Reserved */
263
264 u_char cd_da_supported : 1; /* Reads audio data with READ CD cmd */
265 u_char cd_da_accurate : 1; /* READ CD data stream is accurate */
266 u_char rw_supported : 1; /* Reads R-W sub channel information */
267 u_char rw_deint_corr : 1; /* Reads de-interleved R-W sub chan */
268 u_char c2_pointers : 1; /* Supports C2 error pointers */
269 u_char ISRC : 1; /* Reads ISRC information */
270 u_char UPC : 1; /* Reads media catalog number (UPC) */
271 u_char read_bar_code : 1; /* Supports reading bar codes */
272
273 u_char lock : 1; /* PREVENT/ALLOW may lock media */
274 u_char lock_state : 1; /* Lock state 0=unlocked 1=locked */
275 u_char prevent_jumper : 1; /* State of prev/allow jumper 0=pres */
276 u_char eject : 1; /* Ejects disc/cartr with STOP LoEj */
277 u_char res_6_4 : 1; /* Reserved */
278 u_char loading_type : 3; /* Loading mechanism type */
279 #define CAPS_LT_CADDY 0
280 #define CAPS_LT_TRAY 1
281
282 u_char sep_chan_vol : 1; /* Vol controls each channel separat */
283 u_char sep_chan_mute : 1; /* Mute controls each channel separat*/
284 u_char disk_present_rep: 1; /* Changer supports disk present rep */
285 u_char sw_slot_sel : 1; /* Load empty slot in changer */
286 u_char res_7 : 4; /* Reserved */
287
288 u_short max_read_speed; /* Max. read speed in KB/s */
289 u_short num_vol_levels; /* # of supported volume levels */
290 u_short buffer_size; /* Buffer size for the data in KB */
291 u_short cur_read_speed; /* Current read speed in KB/s */
292
293 u_char res_16; /* Reserved */
294
295 u_char res_17_0 : 1; /* Reserved */
296 u_char BCK : 1; /* Data valid on falling edge of BCK */
297 u_char RCK : 1; /* Set: HIGH high LRCK=left channel */
298 u_char LSBF : 1; /* Set: LSB first Clear: MSB first */
299 u_char length : 2; /* 0=32BCKs 1=16BCKs 2=24BCKs 3=24I2c*/
300 u_char res_17 : 2; /* Reserved */
301
302 u_short max_write_speed; /* Max. write speed n KB/s */
303 u_short cur_write_speed; /* Current write speed in KB/s */
304 };
305
306
307 #define BLANK_DISC 0x00 /* Erase the entire disc */
308 #define BLANK_MINIMAL 0x01 /* Erase the PMA, 1st session TOC, pregap */
309 #define BLANK_TRACK 0x02 /* Erase an incomplete track */
310 #define BLANK_UNRESERVE 0x03 /* Unreserve a track */
311 #define BLANK_TAIL 0x04 /* Erase the tail of a track: input trackno required */
312 #define BLANK_UNCLOSE 0x05 /* Unclose the last session */
313 #define BLANK_SESSION 0x06 /* Erase the last session */
314
315 // #define PGCTL_CURRENT_VALUES 0
316 // #define PGCTL_CHANGE_MASK 1
317 // #define PGCTL_DEFAULT_VALUES 2
318 // #define PGCTL_SAVED_VALUES 3
319
320 void fail(char *fmt, ...);
321
322 struct request_sense *get_sense_data();
323 char* get_sense_string(void);
324
325 int blank(int fd, int type, int track); // see BLANK_xxx above
326 int format(int fd, int session_grow, int size);
327 int close_track_session(int fd, int close_track, int track); // close_track == 0 --> close session
328 int synchronize_cache(int fd);
329 int test_unit_ready(int fd);
330
331 #define DS_OPERATIONAL 0
332 #define DS_NO_DISC 1
333 #define DS_TRAY_OPEN 2
334 #define DS_NOT_READY 3
335 int getDriveState(int fd); // returns DS_xxx
336
337 int inquiry(int fd, struct cdrom_inquiry *inq);
338 int mediumRemoval(int fd, int allow);
339 int read_discinfo(int fd, struct cdrom_discinfo *di);
340 int read_trackinfo(int fd, struct cdrom_trackinfo *ti, int track);
341 int read_buffercapacity(int fd, struct cdrom_buffercapacity *bufcap);
342 int read_reccapacity(int fd, struct cdrom_reccapacity *rc);
343 int read_header(int fd, struct cdrom_header *hd, u_int block);
344 int reserve_track(int fd, int size);
345
346 #define SSU_STOP 0
347 #define SSU_STOP_EJECT 1
348 #define SSU_START 2
349 #define SSU_LOAD_START 3
350 int startStopUnit(int fd, int ssu_action);
351
352 int readCD(int fd, int sectortype, int lba, int nblocks, unsigned char* buf);
353 int writeCD(int fd, int lba, int nblocks, unsigned char* buf);
354
355 int mode_sense(int fd, u_char **buffer, u_char **mode, u_char pageno, int pgctl);
356 int mode_select(int fd, u_char *buffer);
357
358 #ifdef MMC2
359 int verify(int fd, int lba, int nblocks);
360 #else
361 int verify(int fd, int sectortype, int lba, int nblocks, char* buf);
362 #endif
363
364 int set_cdspeed(int fd, int readspeed, int writespeed);
365
366 /* get_write_params sets the pointers to the mode header 'buffer' and the mode page 'wp' */
367 int get_writeparams(int fd, u_char **buffer, struct cdrom_writeparams **wp, int pgctl);
368
369 /* to set write params leave buffer and wp as returned by get_write_params */
370 int set_writeparams(int fd, u_char *buffer, struct cdrom_writeparams *wp);
371 int get_capabilities(int fd, u_char **buffer, struct cdrom_capabilities **cap, int pgctl);
372
373
374 #endif
375
get_capabilities
int get_capabilities(int fd, u_char **buffer, struct cdrom_capabilities **cap, int pgctl)
Definition: ide-pc.c:509
mode_sense
int mode_sense(int fd, u_char **buffer, u_char **mode, u_char pageno, int pgctl)
Definition: ide-pc.c:416
cdrom_writeparams::trk_mode
u_char trk_mode
Definition: ide-pc.h:189
cdrom_inquiry::data_format
u_char data_format
Definition: ide-pc.h:37
cdrom_writeparams::mcn
u_char mcn[16]
Definition: ide-pc.h:224
cdrom_capabilities::p_res
u_char p_res
Definition: ide-pc.h:234
cdrom_capabilities::loading_type
u_char loading_type
Definition: ide-pc.h:278
cdrom_trackinfo::trk_size
u_int trk_size
Definition: ide-pc.h:115
cdrom_trackinfo::data_mode
u_char data_mode
Definition: ide-pc.h:104
cdrom_capabilities::res_17_0
u_char res_17_0
Definition: ide-pc.h:295
cdrom_trackinfo::session
u_char session
Definition: ide-pc.h:98
cdrom_cacheparams::_r1
u_char _r1
Definition: ide-pc.h:165
cdrom_capabilities::dvd_ram_write
u_char dvd_ram_write
Definition: ide-pc.h:252
cdrom_capabilities::BCK
u_char BCK
Definition: ide-pc.h:296
cdrom_header::lba
int lba
Definition: ide-pc.h:133
cdrom_discinfo::data_length
u_short data_length
Definition: ide-pc.h:63
cdrom_writeparams::_r6
u_char _r6
Definition: ide-pc.h:217
close_track
int close_track(int fd, unsigned int track)
Definition: cdrwtool.c:528
cdrom_writeparams::subhdr3
u_char subhdr3
Definition: ide-pc.h:229
cdrom_inquiry::iso_version
u_char iso_version
Definition: ide-pc.h:35
cdrom_capabilities::cd_r_write
u_char cd_r_write
Definition: ide-pc.h:247
cdrom_inquiry
Definition: ide-pc.h:24
cdrom_inquiry::vendor_uniq
char vendor_uniq[20]
Definition: ide-pc.h:58
cdrom_capabilities::cd_da_accurate
u_char cd_da_accurate
Definition: ide-pc.h:265
cdrom_capabilities::p_len
u_char p_len
Definition: ide-pc.h:237
mode_header::r1
u_short r1
Definition: ide-pc.h:145
cdrom_writeparams::_r5
u_char _r5
Definition: ide-pc.h:216
cdrom_cacheparams
Definition: ide-pc.h:163
cdrom_capabilities::res_16
u_char res_16
Definition: ide-pc.h:293
cdrom_capabilities::multi_session
u_char multi_session
Definition: ide-pc.h:261
cdrom_inquiry::softreset
u_char softreset
Definition: ide-pc.h:46
get_writeparams
int get_writeparams(int fd, u_char **buffer, struct cdrom_writeparams **wp, int pgctl)
Definition: ide-pc.c:486
cdrom_capabilities::sep_chan_vol
u_char sep_chan_vol
Definition: ide-pc.h:282
cdrom_buffercapacity::freeBufferLength
u_int freeBufferLength
Definition: ide-pc.h:122
cdrom_discinfo::_r32
u_char _r32
Definition: ide-pc.h:91
synchronize_cache
int synchronize_cache(int fd)
Definition: ide-pc.c:143
cdrom_header::datamode
u_char datamode
Definition: ide-pc.h:131
cdrom_capabilities::dvd_r_write
u_char dvd_r_write
Definition: ide-pc.h:251
read_error_recovery_params::retry_count
u_char retry_count
Definition: ide-pc.h:157
cdrom_writeparams::page_length
u_char page_length
Definition: ide-pc.h:183
format
int format(int fd, int session_grow, int size)
Definition: ide-pc.c:102
sectortype
int sectortype
Definition: wrudf-cdrw.c:63
cdrom_capabilities::RCK
u_char RCK
Definition: ide-pc.h:297
cdrom_trackinfo::nwa
u_int nwa
Definition: ide-pc.h:112
cdrom_cacheparams::length
u_char length
Definition: ide-pc.h:167
cdrom_capabilities::res_7
u_char res_7
Definition: ide-pc.h:286
cdrom_inquiry::reserved
char reserved[40]
Definition: ide-pc.h:59
cdrom_cacheparams::wce
u_char wce
Definition: ide-pc.h:170
read_error_recovery_params::error_recovery_param
u_char error_recovery_param
Definition: ide-pc.h:156
cdrom_capabilities::length
u_char length
Definition: ide-pc.h:299
cdrom_capabilities::cur_read_speed
u_short cur_read_speed
Definition: ide-pc.h:291
cdrom_inquiry::prod_revision
char prod_revision[4]
Definition: ide-pc.h:57
readCD
int readCD(int fd, int sectortype, int lba, int nblocks, unsigned char *buf)
Definition: ide-pc.c:332
cdrom_capabilities::eject
u_char eject
Definition: ide-pc.h:276
cdrom_discinfo::trk0_lastsession
u_char trk0_lastsession
Definition: ide-pc.h:77
cdrom_discinfo::uru
u_char uru
Definition: ide-pc.h:80
cdrom_reccapacity::blocksize
u_int blocksize
Definition: ide-pc.h:127
mode_header::block_desc_length
u_short block_desc_length
Definition: ide-pc.h:146
cdrom_capabilities::res_6_4
u_char res_6_4
Definition: ide-pc.h:277
cdrom_capabilities
Definition: ide-pc.h:232
cdrom_writeparams::data_blk_type
u_char data_blk_type
Definition: ide-pc.h:197
cdrom_capabilities::LSBF
u_char LSBF
Definition: ide-pc.h:298
cdrom_trackinfo::trk_start
u_int trk_start
Definition: ide-pc.h:111
get_sense_string
char * get_sense_string(void)
Definition: ide-pc.c:58
cdrom_capabilities::rw_deint_corr
u_char rw_deint_corr
Definition: ide-pc.h:267
read_error_recovery_params
Definition: ide-pc.h:151
cdrom_inquiry::type
u_char type
Definition: ide-pc.h:25
cdrom_capabilities::rw_supported
u_char rw_supported
Definition: ide-pc.h:266
cdrom_writeparams::audio_pause
u_short audio_pause
Definition: ide-pc.h:223
cdrom_writeparams::copy
u_char copy
Definition: ide-pc.h:190
cdrom_trackinfo::copy
u_char copy
Definition: ide-pc.h:101
mode_hdr
struct mode_header mode_hdr
read_error_recovery_params::_r2
u_char _r2[4]
Definition: ide-pc.h:158
cdrom_inquiry::linked
u_char linked
Definition: ide-pc.h:49
cdrom_writeparams::host_appl_code
u_char host_appl_code
Definition: ide-pc.h:218
cdrom_discinfo::trk0
u_char trk0
Definition: ide-pc.h:75
mode_header::data_length
u_short data_length
Definition: ide-pc.h:142
cdrom_writeparams::_r2
u_char _r2
Definition: ide-pc.h:187
cdrom_buffercapacity::rsrvd
u_short rsrvd
Definition: ide-pc.h:120
cdrom_capabilities::sep_chan_mute
u_char sep_chan_mute
Definition: ide-pc.h:283
cdrom_capabilities::digital_port_1
u_char digital_port_1
Definition: ide-pc.h:258
cdrom_discinfo::n_opc
u_char n_opc
Definition: ide-pc.h:92
writeCD
int writeCD(int fd, int lba, int nblocks, unsigned char *buf)
Definition: ide-pc.c:349
cdrom_trackinfo::fixpkt_size
u_int fixpkt_size
Definition: ide-pc.h:114
cdrom_discinfo::nsessions
u_char nsessions
Definition: ide-pc.h:76
reserve_track
int reserve_track(int fd, int size)
Definition: ide-pc.c:248
cdrom_writeparams::multi_session
u_char multi_session
Definition: ide-pc.h:192
cdrom_writeparams::ps
u_char ps
Definition: ide-pc.h:182
cdrom_inquiry::aenc
u_char aenc
Definition: ide-pc.h:40
cdrom_cacheparams::maxpfceiling
u_short maxpfceiling
Definition: ide-pc.h:175
cdrom_inquiry::termiop
u_char termiop
Definition: ide-pc.h:39
cdrom_header
Definition: ide-pc.h:130
cdrom_inquiry::wbus32
u_char wbus32
Definition: ide-pc.h:52
cdrom_cacheparams::ps
u_char ps
Definition: ide-pc.h:166
cdrom_capabilities::read_bar_code
u_char read_bar_code
Definition: ide-pc.h:271
cdrom_discinfo::_r4
u_char _r4
Definition: ide-pc.h:79
mode_header::medium_type
u_char medium_type
Definition: ide-pc.h:143
mediumRemoval
int mediumRemoval(int fd, int allow)
Definition: ide-pc.c:203
inquiry
int inquiry(int fd, struct cdrom_inquiry *inq)
Definition: ide-pc.c:189
cdrom_capabilities::method2
u_char method2
Definition: ide-pc.h:241
mode_select
int mode_select(int fd, u_char *buffer)
Definition: ide-pc.c:400
cdrom_cacheparams::rcd
u_char rcd
Definition: ide-pc.h:168
read_buffercapacity
int read_buffercapacity(int fd, struct cdrom_buffercapacity *bufcap)
Definition: ide-pc.c:231
cdrom_inquiry::prod_ident
char prod_ident[16]
Definition: ide-pc.h:56
cdrom_discinfo::_r1
u_char _r1
Definition: ide-pc.h:73
cdrom_discinfo::disc_id
u_int disc_id
Definition: ide-pc.h:87
cdrom_inquiry::type_modifier
u_char type_modifier
Definition: ide-pc.h:30
cdrom_cacheparams::_r2
u_char _r2
Definition: ide-pc.h:171
cdrom_inquiry::ansi_version
u_char ansi_version
Definition: ide-pc.h:33
cdrom_trackinfo::free_blks
u_int free_blks
Definition: ide-pc.h:113
cdrom_trackinfo::trk
u_char trk
Definition: ide-pc.h:97
cdrom_capabilities::digital_port_2
u_char digital_port_2
Definition: ide-pc.h:257
cdrom_capabilities::mode_2_form_2
u_char mode_2_form_2
Definition: ide-pc.h:260
cdrom_inquiry::add_len
u_char add_len
Definition: ide-pc.h:42
cdrom_discinfo::did_v
u_char did_v
Definition: ide-pc.h:82
cdrom_capabilities::cd_r_read
u_char cd_r_read
Definition: ide-pc.h:239
cdrom_inquiry::ecma_version
u_char ecma_version
Definition: ide-pc.h:34
cdrom_writeparams::__attribute__
u_int pkt_size __attribute__((packed))
cdrom_inquiry::reladr
u_char reladr
Definition: ide-pc.h:53
cdrom_cacheparams::page_code
u_char page_code
Definition: ide-pc.h:164
cdrom_capabilities::cur_write_speed
u_short cur_write_speed
Definition: ide-pc.h:303
cdrom_trackinfo::trk_mode
u_char trk_mode
Definition: ide-pc.h:100
cdrom_trackinfo::_r4
u_char _r4
Definition: ide-pc.h:99
cdrom_writeparams::_r4
u_char _r4
Definition: ide-pc.h:214
cdrom_capabilities::sw_slot_sel
u_char sw_slot_sel
Definition: ide-pc.h:285
cdrom_capabilities::disk_present_rep
u_char disk_present_rep
Definition: ide-pc.h:284
cdrom_inquiry::qualifier
u_char qualifier
Definition: ide-pc.h:28
cdrom_trackinfo::damage
u_char damage
Definition: ide-pc.h:102
cdrom_capabilities::composite
u_char composite
Definition: ide-pc.h:256
cdrom_capabilities::p_code
u_char p_code
Definition: ide-pc.h:233
cdrom_capabilities::lock
u_char lock
Definition: ide-pc.h:273
fail
void fail(char *fmt,...)
Definition: ide-pc.c:43
cdrom_writeparams::_r9
u_char _r9
Definition: ide-pc.h:221
cdrom_writeparams::test_write
u_char test_write
Definition: ide-pc.h:186
cdrom_capabilities::max_read_speed
u_short max_read_speed
Definition: ide-pc.h:288
startStopUnit
int startStopUnit(int fd, int ssu_action)
Definition: ide-pc.c:259
cdrom_capabilities::dvd_r_read
u_char dvd_r_read
Definition: ide-pc.h:243
cdrom_writeparams::page_code
u_char page_code
Definition: ide-pc.h:180
cdrom_writeparams::subhdr0
u_char subhdr0
Definition: ide-pc.h:226
cdrom_capabilities::res_4
u_char res_4
Definition: ide-pc.h:262
cdrom_cacheparams::dpftl
u_short dpftl
Definition: ide-pc.h:172
cdrom_writeparams::isrc
u_char isrc[16]
Definition: ide-pc.h:225
cdrom_inquiry::res7_2
u_char res7_2
Definition: ide-pc.h:48
cdrom_capabilities::cd_rw_read
u_char cd_rw_read
Definition: ide-pc.h:240
cdrom_inquiry::res2
u_char res2
Definition: ide-pc.h:44
cdrom_capabilities::ISRC
u_char ISRC
Definition: ide-pc.h:269
cdrom_writeparams::_r7
u_char _r7
Definition: ide-pc.h:219
close_track_session
int close_track_session(int fd, int close_track, int track)
Definition: ide-pc.c:90
cdrom_capabilities::cd_da_supported
u_char cd_da_supported
Definition: ide-pc.h:264
read_error_recovery_params::page_code
u_char page_code
Definition: ide-pc.h:152
read_error_recovery_params::ps
u_char ps
Definition: ide-pc.h:154
cdrom_capabilities::max_write_speed
u_short max_write_speed
Definition: ide-pc.h:302
cdrom_capabilities::cd_rw_write
u_char cd_rw_write
Definition: ide-pc.h:248
cdrom_capabilities::num_vol_levels
u_short num_vol_levels
Definition: ide-pc.h:289
cdrom_capabilities::dvd_ram_read
u_char dvd_ram_read
Definition: ide-pc.h:244
cdrom_writeparams::fp
u_char fp
Definition: ide-pc.h:191
cdrom_capabilities::mode_2_form_1
u_char mode_2_form_1
Definition: ide-pc.h:259
cdrom_inquiry::removable
u_char removable
Definition: ide-pc.h:31
cdrom_cacheparams::maxpf
u_short maxpf
Definition: ide-pc.h:174
cdrom_inquiry::wbus16
u_char wbus16
Definition: ide-pc.h:51
cdrom_trackinfo::fixpkt
u_char fixpkt
Definition: ide-pc.h:105
read_error_recovery_params::length
u_char length
Definition: ide-pc.h:155
cdrom_capabilities::res_3_3
u_char res_3_3
Definition: ide-pc.h:250
read_error_recovery_params::_r1
u_char _r1
Definition: ide-pc.h:153
cdrom_discinfo::_r11
u_char _r11
Definition: ide-pc.h:86
cdrom_capabilities::UPC
u_char UPC
Definition: ide-pc.h:270
cdrom_discinfo::latest_leadin_msf
u_char latest_leadin_msf[4]
Definition: ide-pc.h:88
read_trackinfo
int read_trackinfo(int fd, struct cdrom_trackinfo *ti, int track)
Definition: ide-pc.c:308
cdrom_writeparams::subhdr2
u_char subhdr2
Definition: ide-pc.h:228
cdrom_inquiry::sense_len
u_char sense_len
Definition: ide-pc.h:43
cdrom_inquiry::sync
u_char sync
Definition: ide-pc.h:50
cdrom_discinfo::session_status
u_char session_status
Definition: ide-pc.h:68
cdrom_writeparams::subhdr1
u_char subhdr1
Definition: ide-pc.h:227
cdrom_discinfo::disc_status
u_char disc_status
Definition: ide-pc.h:64
cdrom_capabilities::c2_pointers
u_char c2_pointers
Definition: ide-pc.h:268
test_unit_ready
int test_unit_ready(int fd)
Definition: ide-pc.c:153
verify
int verify(int fd, int sectortype, int lba, int nblocks, char *buf)
cdrom_capabilities::audio_play
u_char audio_play
Definition: ide-pc.h:255
cdrom_trackinfo::nwa_v
u_char nwa_v
Definition: ide-pc.h:109
get_sense_data
struct request_sense * get_sense_data()
Definition: ide-pc.c:52
cdrom_trackinfo::packet
u_char packet
Definition: ide-pc.h:106
cdrom_buffercapacity
Definition: ide-pc.h:118
cdrom_buffercapacity::dataLength
u_short dataLength
Definition: ide-pc.h:119
mode_header::dev_specific
u_char dev_specific
Definition: ide-pc.h:144
cdrom_capabilities::buffer_size
u_short buffer_size
Definition: ide-pc.h:290
cdrom_buffercapacity::totalBufferLength
u_int totalBufferLength
Definition: ide-pc.h:121
cdrom_inquiry::res3_54
u_char res3_54
Definition: ide-pc.h:38
read_reccapacity
int read_reccapacity(int fd, struct cdrom_reccapacity *rc)
Definition: ide-pc.c:215
cdrom_capabilities::lock_state
u_char lock_state
Definition: ide-pc.h:274
cdrom_discinfo::last_leadout_msf
u_char last_leadout_msf[4]
Definition: ide-pc.h:89
cdrom_discinfo::trk1_lastsession
u_char trk1_lastsession
Definition: ide-pc.h:78
cdrom_inquiry::vendor_info
char vendor_info[8]
Definition: ide-pc.h:55
set_writeparams
int set_writeparams(int fd, u_char *buffer, struct cdrom_writeparams *wp)
Definition: ide-pc.c:495
cdrom_reccapacity
Definition: ide-pc.h:125
cdrom_inquiry::cmdque
u_char cmdque
Definition: ide-pc.h:47
read_discinfo
int read_discinfo(int fd, struct cdrom_discinfo *di)
Definition: ide-pc.c:270
cdrom_writeparams
Definition: ide-pc.h:179
cdrom_trackinfo::data_length
u_short data_length
Definition: ide-pc.h:96
cdrom_discinfo::_r10
u_char _r10
Definition: ide-pc.h:85
cdrom_discinfo::erasable
u_char erasable
Definition: ide-pc.h:72
cdrom_trackinfo::_r5
u_char _r5
Definition: ide-pc.h:103
cdrom_writeparams::write_type
u_char write_type
Definition: ide-pc.h:185
blank
int blank(int fd, int type, int track)
Definition: ide-pc.c:77
mode_header
Definition: ide-pc.h:141
cdrom_discinfo::_r9
u_char _r9
Definition: ide-pc.h:84
cdrom_header::_r234
u_char _r234[3]
Definition: ide-pc.h:132
cdrom_capabilities::test_write
u_char test_write
Definition: ide-pc.h:249
getDriveState
int getDriveState(int fd)
Definition: ide-pc.c:164
cdrom_discinfo::barcode
u_char barcode[8]
Definition: ide-pc.h:90
cdrom_capabilities::prevent_jumper
u_char prevent_jumper
Definition: ide-pc.h:275
read_header
int read_header(int fd, struct cdrom_header *hd, u_int block)
Definition: ide-pc.c:290
set_cdspeed
int set_cdspeed(int fd, int readspeed, int writespeed)
Definition: ide-pc.c:130
cdrom_discinfo::dbc_v
u_char dbc_v
Definition: ide-pc.h:81
cdrom_trackinfo
Definition: ide-pc.h:95
cdrom_discinfo::disc_type
u_char disc_type
Definition: ide-pc.h:83
cdrom_capabilities::res_17
u_char res_17
Definition: ide-pc.h:300
cdrom_cacheparams::minpf
u_short minpf
Definition: ide-pc.h:173
cdrom_capabilities::parsave
u_char parsave
Definition: ide-pc.h:235
cdrom_trackinfo::rsrvd_trk
u_char rsrvd_trk
Definition: ide-pc.h:108
cdrom_reccapacity::lastblock
u_int lastblock
Definition: ide-pc.h:126
cdrom_writeparams::session_format
u_char session_format
Definition: ide-pc.h:220
cdrom_capabilities::dvd_rom_read
u_char dvd_rom_read
Definition: ide-pc.h:242
cdrom_capabilities::res_2_67
u_char res_2_67
Definition: ide-pc.h:245
cdrom_writeparams::_r1
u_char _r1
Definition: ide-pc.h:181
cdrom_capabilities::res_3_67
u_char res_3_67
Definition: ide-pc.h:253
cdrom_trackinfo::blank
u_char blank
Definition: ide-pc.h:107
cdrom_cacheparams::mf
u_char mf
Definition: ide-pc.h:169
ti
struct cdrom_trackinfo ti
Definition: wrudf-cdrw.c:50
cdrom_discinfo
Definition: ide-pc.h:62
cdrom_trackinfo::_r7
u_char _r7
Definition: ide-pc.h:110