xorriso
1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
![]() ![]() |
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <string.h>
#include <stdlib.h>
#include "libburn.h"
#include "transport.h"
#include "spc.h"
#include "mmc.h"
#include "sbc.h"
#include "drive.h"
#include "debug.h"
#include "options.h"
#include "init.h"
#include "util.h"
#include "libdax_msgs.h"
Go to the source code of this file.
Functions | |
int | scsi_init_command (struct command *c, unsigned char *opcode, int oplen) |
int | spc_decode_sense (unsigned char *sense, int senselen, int *key, int *asc, int *ascq) |
int | spc_test_unit_ready_r (struct burn_drive *d, int *key, int *asc, int *ascq, int *progress) |
int | spc_test_unit_ready (struct burn_drive *d) |
int | spc_wait_unit_attention (struct burn_drive *d, int max_sec, char *cmd_text, int flag) |
void | spc_request_sense (struct burn_drive *d, struct buffer *buf) |
static int | spc_report_async_error (struct burn_drive *d, int key, int asc, int ascq, int flag) |
int | spc_get_erase_progress (struct burn_drive *d) |
void | spc_inquiry (struct burn_drive *d) |
void | spc_prevent (struct burn_drive *d) |
void | spc_allow (struct burn_drive *d) |
static int | spc_try_get_performance (struct burn_drive *d, int flag) |
static int | spc_sense_caps_al (struct burn_drive *d, int *alloc_len, int flag) |
void | spc_sense_caps (struct burn_drive *d) |
void | spc_sense_error_params (struct burn_drive *d) |
void | spc_select_error_params (struct burn_drive *d, const struct burn_read_opts *o) |
void | spc_sense_write_params (struct burn_drive *d) |
void | spc_select_write_params (struct burn_drive *d, struct burn_session *s, int tnum, const struct burn_write_opts *o) |
void | spc_getcaps (struct burn_drive *d) |
void | spc_probe_write_modes (struct burn_drive *d) |
int | spc_block_type (enum burn_block_types b) |
int | spc_setup_drive (struct burn_drive *d) |
int | burn_scsi_setup_drive (struct burn_drive *d, int bus_no, int host_no, int channel_no, int target_no, int lun_no, int flag) |
enum response | scsi_error_msg (struct burn_drive *d, unsigned char *sense, int senselen, char msg_data[161], int *key, int *asc, int *ascq) |
enum response | scsi_error (struct burn_drive *d, unsigned char *sense, int senselen) |
static char * | scsi_command_name (unsigned int c, int flag) |
char * | spc_command_name (unsigned int c, int flag) |
void | spc_register_retry (struct command *c) |
int | spc_human_readable_cmd (struct command *c, char *msg, int msg_max, int flag) |
int | scsi_notify_error (struct burn_drive *d, struct command *c, unsigned char *sense, int senselen, int flag) |
int | scsi_show_command (unsigned char *opcode, int oplen, int dir, unsigned char *data, int bytes, void *fp_in, int flag) |
int | scsi_show_cmd_text (struct command *c, void *fp_in, int flag) |
int | scsi_show_command_reply (unsigned char *opcode, int data_dir, unsigned char *data, int dxfer_len, void *fp_in, int flag) |
int | scsi_log_command (unsigned char *opcode, int oplen, int data_dir, unsigned char *data, int bytes, void *fp_in, int flag) |
int | scsi_log_text (char *text, void *fp_in, int flag) |
int | scsi_log_cmd (struct command *c, void *fp_in, int flag) |
int | scsi_log_reply (unsigned char *opcode, int data_dir, unsigned char *data, int dxfer_len, void *fp_in, unsigned char sense[18], int sense_len, double duration, int flag) |
int | scsi_log_err (struct burn_drive *d, struct command *c, void *fp_in, unsigned char sense[18], int sense_len, int flag) |
int | scsi_log_message (struct burn_drive *d, void *fp_in, char *msg, int flag) |
int | scsi_eval_cmd_outcome (struct burn_drive *d, struct command *c, void *fp, unsigned char *sense, int sense_len, time_t start_time, int timeout_ms, int loop_count, int flag) |
int | spc_confirm_cd_drive (struct burn_drive *d, int flag) |
Variables | |
struct libdax_msgs * | libdax_messenger |
int | burn_sg_log_scsi |
static unsigned char | SPC_INQUIRY [] = { 0x12, 0, 0, 0, 36, 0 } |
static unsigned char | SPC_PREVENT [] = { 0x1e, 0, 0, 0, 1, 0 } |
static unsigned char | SPC_ALLOW [] = { 0x1e, 0, 0, 0, 0, 0 } |
static unsigned char | SPC_MODE_SENSE [] = { 0x5a, 0, 0, 0, 0, 0, 0, 16, 0, 0 } |
static unsigned char | SPC_MODE_SELECT [] = { 0x55, 16, 0, 0, 0, 0, 0, 0, 0, 0 } |
static unsigned char | SPC_REQUEST_SENSE [] = { 0x03, 0, 0, 0, 18, 0 } |
static unsigned char | SPC_TEST_UNIT_READY [] = { 0x00, 0, 0, 0, 0, 0 } |
int burn_scsi_setup_drive | ( | struct burn_drive * | d, |
int | bus_no, | ||
int | host_no, | ||
int | channel_no, | ||
int | target_no, | ||
int | lun_no, | ||
int | flag | ||
) |
Definition at line 1213 of file spc.c.
References burn_drive::bus_no, burn_drive::channel, scsi_mode_data::cur_read_speed, scsi_mode_data::cur_write_speed, burn_drive::had_particular_error, burn_drive::host, burn_drive::id, burn_drive::idata, libdax_messenger, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_FATAL, libdax_msgs_submit(), burn_drive::lun, scsi_mode_data::max_read_speed, scsi_mode_data::max_write_speed, burn_drive::mdata, mmc_setup_drive(), scsi_mode_data::p2a_valid, sbc_setup_drive(), burn_drive::silent_on_scsi_error, spc_setup_drive(), scsi_mode_data::speed_descriptors, burn_scsi_inquiry_data::valid, scsi_mode_data::write_page_length, and scsi_mode_data::write_page_valid.
Referenced by burn_drive_grab_dummy(), and enumerate_common().
|
static |
Definition at line 1687 of file spc.c.
Referenced by scsi_notify_error(), scsi_show_command(), and spc_command_name().
enum response scsi_error | ( | struct burn_drive * | d, |
unsigned char * | sense, | ||
int | senselen | ||
) |
Definition at line 1213 of file spc.c.
Referenced by scsi_eval_cmd_outcome(), and sg_issue_command().
enum response scsi_error_msg | ( | struct burn_drive * | d, |
unsigned char * | sense, | ||
int | senselen, | ||
char | msg_data[161], | ||
int * | key, | ||
int * | asc, | ||
int * | ascq | ||
) |
Definition at line 1213 of file spc.c.
Referenced by mmc_close(), mmc_eval_read_error(), mmc_format_unit(), mmc_read_10(), mmc_set_streaming(), mmc_sync_cache(), mmc_write(), scsi_notify_error(), spc_report_async_error(), and spc_wait_unit_attention().
int scsi_eval_cmd_outcome | ( | struct burn_drive * | d, |
struct command * | c, | ||
void * | fp_in, | ||
unsigned char * | sense, | ||
int | sense_len, | ||
time_t | start_time, | ||
int | timeout_ms, | ||
int | loop_count, | ||
int | flag | ||
) |
Evaluates outcome of a single SCSI command, eventually logs sense data, and issues DEBUG error message in case the command is evaluated as done.
flag | bit1 = do not print duration |
Definition at line 2109 of file spc.c.
References BURN_ALLOC_MEM_VOID, BURN_FREE_MEM, burn_sg_log_scsi, burn_drive::cancel, command::error, FAIL, burn_drive::global_index, GO_ON, Libburn_scsi_retry_incR, Libburn_scsi_retry_umaX, Libburn_scsi_retry_usleeP, Libburn_scsi_write_retry_incR, Libburn_scsi_write_retry_umaX, Libburn_scsi_write_retry_usleeP, libdax_messenger, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_SORRY, libdax_msgs_submit(), command::opcode, RETRY, command::retry, scsi_error(), scsi_log_cmd(), scsi_log_err(), scsi_notify_error(), command::sense, command::sense_len, spc_human_readable_cmd(), and command::start_time.
Referenced by sg_issue_command().
int scsi_init_command | ( | struct command * | c, |
unsigned char * | opcode, | ||
int | oplen | ||
) |
Definition at line 68 of file spc.c.
References command::dir, command::dxfer_len, command::end_time, command::error, command::last_retry_asc, command::last_retry_ascq, command::last_retry_key, Libburn_scsi_default_timeouT, NO_TRANSFER, command::opcode, command::oplen, command::page, command::retry, command::retry_count, command::sense, command::sense_len, command::start_time, and command::timeout.
Referenced by mmc_close(), mmc_erase(), mmc_format_unit(), mmc_get_configuration_al(), mmc_get_event(), mmc_get_leadin_text_al(), mmc_get_performance_al(), mmc_perform_opc(), mmc_read_10(), mmc_read_atip(), mmc_read_buffer_capacity(), mmc_read_capacity(), mmc_read_cd(), mmc_read_cd_msf(), mmc_read_disc_info_al(), mmc_read_disc_structure_al(), mmc_read_format_capacities_al(), mmc_read_lead_in(), mmc_read_multi_session_c1(), mmc_read_toc_al(), mmc_read_toc_fmt0_al(), mmc_read_track_info(), mmc_reserve_track(), mmc_send_cue_sheet(), mmc_set_speed(), mmc_set_streaming(), mmc_sync_cache(), mmc_write(), mmc_write_12(), sbc_eject(), sbc_load(), sbc_start_unit_flag(), sbc_stop_unit(), spc_allow(), spc_inquiry(), spc_prevent(), spc_probe_write_modes(), spc_request_sense(), spc_select_error_params(), spc_select_write_params(), spc_sense_caps_al(), spc_sense_error_params(), spc_sense_write_params(), and spc_test_unit_ready_r().
int scsi_log_cmd | ( | struct command * | c, |
void * | fp_in, | ||
int | flag | ||
) |
Logs command (before execution)
Definition at line 2002 of file spc.c.
References buffer::bytes, buffer::data, command::dir, command::opcode, command::oplen, command::page, and scsi_log_command().
Referenced by scsi_eval_cmd_outcome(), and sg_issue_command().
int scsi_log_command | ( | unsigned char * | opcode, |
int | oplen, | ||
int | data_dir, | ||
unsigned char * | data, | ||
int | bytes, | ||
void * | fp_in, | ||
int | flag | ||
) |
Logs command (before execution)
Definition at line 1964 of file spc.c.
References burn_sg_log_scsi, command::opcode, command::oplen, and scsi_show_command().
Referenced by scsi_log_cmd(), and sgio_log_cmd().
int scsi_log_err | ( | struct burn_drive * | d, |
struct command * | c, | ||
void * | fp_in, | ||
unsigned char | sense[18], | ||
int | sense_len, | ||
int | flag | ||
) |
Legacy frontend to scsi_log_reply().
flag | bit0 causes an error message bit1 do not print duration |
Definition at line 2070 of file spc.c.
References buffer::data, command::dir, command::dxfer_len, command::end_time, command::opcode, command::page, scsi_log_reply(), command::sense, command::sense_len, and command::start_time.
Referenced by scsi_eval_cmd_outcome().
int scsi_log_message | ( | struct burn_drive * | d, |
void * | fp_in, | ||
char * | msg, | ||
int | flag | ||
) |
Definition at line 2087 of file spc.c.
References burn_sg_log_scsi.
Referenced by evaluate_transport_success(), react_on_drive_loss(), and sg_issue_command().
int scsi_log_reply | ( | unsigned char * | opcode, |
int | data_dir, | ||
unsigned char * | data, | ||
int | dxfer_len, | ||
void * | fp_in, | ||
unsigned char | sense[18], | ||
int | sense_len, | ||
double | duration, | ||
int | flag | ||
) |
Logs outcome of a sg command.
flag | bit0 causes an error message bit1 do not print duration |
Definition at line 2022 of file spc.c.
References burn_get_time(), burn_sg_log_scsi, command::dxfer_len, lib_start_time, command::opcode, scsi_show_command_reply(), command::sense, command::sense_len, and spc_decode_sense().
Referenced by scsi_log_err(), and sgio_log_reply().
int scsi_log_text | ( | char * | text, |
void * | fp_in, | ||
int | flag | ||
) |
Definition at line 1984 of file spc.c.
References burn_sg_log_scsi.
Referenced by sg_issue_command().
int scsi_notify_error | ( | struct burn_drive * | d, |
struct command * | c, | ||
unsigned char * | sense, | ||
int | senselen, | ||
int | flag | ||
) |
Definition at line 1832 of file spc.c.
References BURN_ALLOC_MEM, BURN_FREE_MEM, burn_drive::global_index, libdax_messenger, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_SEV_FAILURE, libdax_msgs_submit(), command::opcode, scsi_command_name(), scsi_error_msg(), command::sense, burn_drive::silent_on_scsi_error, and spc_human_readable_cmd().
Referenced by mmc_erase(), mmc_reserve_track(), mmc_send_cue_sheet(), and scsi_eval_cmd_outcome().
int scsi_show_cmd_text | ( | struct command * | c, |
void * | fp_in, | ||
int | flag | ||
) |
Definition at line 1928 of file spc.c.
References buffer::bytes, buffer::data, command::dir, command::opcode, command::oplen, command::page, and scsi_show_command().
int scsi_show_command | ( | unsigned char * | opcode, |
int | oplen, | ||
int | dir, | ||
unsigned char * | data, | ||
int | bytes, | ||
void * | fp_in, | ||
int | flag | ||
) |
Definition at line 1886 of file spc.c.
References command::dir, mmc_four_char_to_int(), command::opcode, command::oplen, scsi_command_name(), and TO_DRIVE.
Referenced by scsi_log_command(), and scsi_show_cmd_text().
int scsi_show_command_reply | ( | unsigned char * | opcode, |
int | data_dir, | ||
unsigned char * | data, | ||
int | dxfer_len, | ||
void * | fp_in, | ||
int | flag | ||
) |
Definition at line 1936 of file spc.c.
References command::dxfer_len, FROM_DRIVE, and command::opcode.
Referenced by scsi_log_reply().
void spc_allow | ( | struct burn_drive * | d | ) |
Definition at line 436 of file spc.c.
References burn_drive::casual_command, command::dir, burn_drive::issue_command, mmc_function_spy(), NO_TRANSFER, command::retry, scsi_init_command(), and SPC_ALLOW.
Referenced by spc_setup_drive().
int spc_block_type | ( | enum burn_block_types | b | ) |
Definition at line 1161 of file spc.c.
References BURN_BLOCK_MODE1, BURN_BLOCK_MODE2_LAME, BURN_BLOCK_MODE2_OBSCURE, BURN_BLOCK_MODE2_OK, BURN_BLOCK_MODE2_PATHETIC, BURN_BLOCK_MODE2R, BURN_BLOCK_RAW0, BURN_BLOCK_RAW16, BURN_BLOCK_RAW96P, BURN_BLOCK_RAW96R, and BURN_BLOCK_SAO.
Referenced by burn_write_opts_set_write_type(), and mmc_compose_mode_page_5().
char* spc_command_name | ( | unsigned int | c, |
int | flag | ||
) |
Definition at line 1768 of file spc.c.
References scsi_command_name().
Referenced by spc_human_readable_cmd().
int spc_confirm_cd_drive | ( | struct burn_drive * | d, |
int | flag | ||
) |
Definition at line 2188 of file spc.c.
References BURN_ALLOC_MEM, BURN_FREE_MEM, burn_drive::devname, burn_drive::idata, libdax_messenger, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_FAILURE, libdax_msgs_submit(), burn_scsi_inquiry_data::peripheral, spc_inquiry(), and burn_scsi_inquiry_data::valid.
Referenced by sg_grab().
int spc_decode_sense | ( | unsigned char * | sense, |
int | senselen, | ||
int * | key, | ||
int * | asc, | ||
int * | ascq | ||
) |
Definition at line 93 of file spc.c.
Referenced by mmc_format_unit(), mmc_get_configuration_al(), mmc_read_disc_info_al(), mmc_set_streaming(), mmc_write(), scsi_log_reply(), sg_issue_command(), spc_probe_write_modes(), spc_register_retry(), and spc_test_unit_ready_r().
int spc_get_erase_progress | ( | struct burn_drive * | d | ) |
Definition at line 335 of file spc.c.
References BURN_ALLOC_MEM, BURN_FREE_MEM, buffer::data, mmc_function_spy(), spc_report_async_error(), spc_request_sense(), and spc_test_unit_ready_r().
Referenced by spc_setup_drive().
void spc_getcaps | ( | struct burn_drive * | d | ) |
Definition at line 1038 of file spc.c.
References burn_speed_descriptor_destroy(), burn_drive::mdata, mmc_function_spy(), spc_inquiry(), spc_sense_caps(), spc_sense_error_params(), and scsi_mode_data::speed_descriptors.
Referenced by spc_setup_drive().
int spc_human_readable_cmd | ( | struct command * | c, |
char * | msg, | ||
int | msg_max, | ||
int | flag | ||
) |
Definition at line 1787 of file spc.c.
References command::dir, command::dxfer_len, command::last_retry_asc, command::last_retry_ascq, command::last_retry_key, NO_TRANSFER, command::opcode, command::oplen, command::page, command::retry_count, and spc_command_name().
Referenced by evaluate_transport_success(), mmc_close(), mmc_sync_cache(), mmc_write(), scsi_eval_cmd_outcome(), scsi_notify_error(), and sg_issue_command().
void spc_inquiry | ( | struct burn_drive * | d | ) |
Definition at line 376 of file spc.c.
References BURN_ALLOC_MEM_VOID, BURN_FREE_MEM, buffer::bytes, buffer::data, command::dir, command::dxfer_len, command::error, FROM_DRIVE, burn_drive::idata, burn_drive::issue_command, mmc_function_spy(), command::opcode, command::page, burn_scsi_inquiry_data::peripheral, burn_scsi_inquiry_data::product, command::retry, burn_scsi_inquiry_data::revision, scsi_init_command(), buffer::sectors, SPC_INQUIRY, burn_scsi_inquiry_data::vendor, and burn_scsi_inquiry_data::version.
Referenced by spc_confirm_cd_drive(), and spc_getcaps().
void spc_prevent | ( | struct burn_drive * | d | ) |
Definition at line 417 of file spc.c.
References burn_drive::casual_command, command::dir, burn_drive::issue_command, mmc_function_spy(), mmc_get_event(), NO_TRANSFER, command::retry, scsi_init_command(), and SPC_PREVENT.
Referenced by spc_setup_drive().
void spc_probe_write_modes | ( | struct burn_drive * | d | ) |
Definition at line 1054 of file spc.c.
References burn_drive::block_types, BURN_ALLOC_MEM_VOID, BURN_BLOCK_SAO, BURN_FREE_MEM, buffer::bytes, buffer::data, command::dir, burn_drive::issue_command, mmc_function_spy(), mmc_start_if_needed(), command::opcode, command::page, command::retry, scsi_init_command(), command::sense, burn_drive::silent_on_scsi_error, spc_decode_sense(), SPC_MODE_SELECT, and TO_DRIVE.
Referenced by spc_setup_drive().
void spc_register_retry | ( | struct command * | c | ) |
Definition at line 1775 of file spc.c.
References command::last_retry_asc, command::last_retry_ascq, command::last_retry_key, command::retry_count, command::sense, command::sense_len, and spc_decode_sense().
Referenced by sg_issue_command().
|
static |
Definition at line 305 of file spc.c.
References BURN_ALLOC_MEM, BURN_DRIVE_ADR_LEN, BURN_FREE_MEM, burn_drive::global_index, libdax_messenger, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_FAILURE, libdax_msgs_submit(), scsi_error_msg(), and command::sense.
Referenced by spc_get_erase_progress().
void spc_request_sense | ( | struct burn_drive * | d, |
struct buffer * | buf | ||
) |
Definition at line 286 of file spc.c.
References buffer::bytes, burn_drive::casual_command, command::dir, command::dxfer_len, FROM_DRIVE, burn_drive::issue_command, mmc_function_spy(), command::opcode, command::page, command::retry, scsi_init_command(), buffer::sectors, and SPC_REQUEST_SENSE.
Referenced by spc_get_erase_progress().
void spc_select_error_params | ( | struct burn_drive * | d, |
const struct burn_read_opts * | o | ||
) |
Definition at line 757 of file spc.c.
References BURN_ALLOC_MEM_VOID, BURN_FREE_MEM, buffer::bytes, buffer::data, command::dir, burn_read_opts::hardware_error_recovery, burn_drive::issue_command, burn_drive::mdata, mmc_function_spy(), mmc_start_if_needed(), command::opcode, command::page, burn_drive::params, burn_read_opts::report_recovered_errors, params::retries, command::retry, scsi_mode_data::retry_page_length, scsi_mode_data::retry_page_valid, scsi_init_command(), buffer::sectors, SPC_MODE_SELECT, TO_DRIVE, and burn_read_opts::transfer_damaged_blocks.
Referenced by spc_setup_drive().
void spc_select_write_params | ( | struct burn_drive * | d, |
struct burn_session * | s, | ||
int | tnum, | ||
const struct burn_write_opts * | o | ||
) |
Definition at line 867 of file spc.c.
References BURN_ALLOC_MEM_VOID, BURN_FREE_MEM, buffer::bytes, buffer::data, command::dir, command::dxfer_len, command::error, FROM_DRIVE, burn_drive::issue_command, burn_drive::mdata, mmc_compose_mode_page_5(), mmc_function_spy(), mmc_start_if_needed(), command::opcode, command::page, command::retry, scsi_init_command(), buffer::sectors, SPC_MODE_SELECT, SPC_MODE_SENSE, TO_DRIVE, and scsi_mode_data::write_page_length.
Referenced by mmc_close_disc(), mmc_close_session(), and spc_setup_drive().
void spc_sense_caps | ( | struct burn_drive * | d | ) |
Definition at line 686 of file spc.c.
References mmc_function_spy(), mmc_get_configuration(), mmc_start_if_needed(), spc_sense_caps_al(), and spc_try_get_performance().
Referenced by spc_getcaps().
|
static |
flag | bit0= do only inquire alloc_len |
Definition at line 483 of file spc.c.
References BUFFER_SIZE, scsi_mode_data::buffer_size, BURN_ALLOC_MEM, BURN_DRIVE_ADR_LEN, BURN_FREE_MEM, burn_mdata_free_subs(), burn_speed_descriptor_new(), buffer::bytes, scsi_mode_data::c2_pointers, scsi_mode_data::cdr_read, scsi_mode_data::cdr_write, scsi_mode_data::cdrw_read, scsi_mode_data::cdrw_write, scsi_mode_data::cur_read_speed, scsi_mode_data::cur_write_speed, burn_drive::current_profile, burn_drive::current_profile_text, buffer::data, burn_drive::devname, command::dir, scsi_mode_data::dvdr_read, scsi_mode_data::dvdr_write, scsi_mode_data::dvdram_read, scsi_mode_data::dvdram_write, scsi_mode_data::dvdrom_read, command::dxfer_len, command::error, FROM_DRIVE, burn_drive::global_index, burn_drive::issue_command, libdax_messenger, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_PRIO_LOW, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_SEV_SORRY, libdax_msgs_submit(), scsi_mode_data::max_end_lba, scsi_mode_data::max_read_speed, scsi_mode_data::max_write_speed, burn_drive::mdata, scsi_mode_data::min_end_lba, scsi_mode_data::min_write_speed, command::opcode, scsi_mode_data::p2a_valid, command::page, burn_speed_descriptor::profile_loaded, burn_speed_descriptor::profile_name, command::retry, scsi_init_command(), buffer::sectors, scsi_mode_data::simulate, burn_speed_descriptor::source, SPC_MODE_SENSE, scsi_mode_data::speed_descriptors, scsi_mode_data::underrun_proof, burn_speed_descriptor::wrc, and burn_speed_descriptor::write_speed.
Referenced by spc_sense_caps().
void spc_sense_error_params | ( | struct burn_drive * | d | ) |
Definition at line 721 of file spc.c.
References BURN_ALLOC_MEM_VOID, BURN_FREE_MEM, buffer::bytes, buffer::data, command::dir, command::dxfer_len, FROM_DRIVE, burn_drive::issue_command, burn_drive::mdata, mmc_function_spy(), mmc_start_if_needed(), command::opcode, command::page, burn_drive::params, params::retries, command::retry, scsi_mode_data::retry_page_length, scsi_mode_data::retry_page_valid, scsi_init_command(), buffer::sectors, and SPC_MODE_SENSE.
Referenced by spc_getcaps().
void spc_sense_write_params | ( | struct burn_drive * | d | ) |
Definition at line 797 of file spc.c.
References BURN_ALLOC_MEM_VOID, BURN_DISC_APPENDABLE, BURN_DISC_BLANK, burn_drive_send_default_page_05(), BURN_FREE_MEM, buffer::bytes, burn_drive::current_is_cd_profile, burn_drive::current_profile, buffer::data, command::dir, command::dxfer_len, command::error, FROM_DRIVE, burn_drive::get_nwa, burn_drive::issue_command, burn_drive::mdata, mmc_function_spy(), mmc_read_disc_info(), mmc_start_if_needed(), command::opcode, command::page, burn_drive::read_format_capacities, command::retry, scsi_init_command(), buffer::sectors, SPC_MODE_SENSE, burn_drive::status, scsi_mode_data::write_page_length, and scsi_mode_data::write_page_valid.
Referenced by spc_setup_drive().
int spc_setup_drive | ( | struct burn_drive * | d | ) |
Definition at line 1195 of file spc.c.
References burn_drive::get_erase_progress, burn_drive::getcaps, burn_drive::lock, burn_drive::probe_write_modes, burn_drive::read_disc_info, burn_drive::send_parameters, burn_drive::send_write_parameters, spc_allow(), spc_get_erase_progress(), spc_getcaps(), spc_prevent(), spc_probe_write_modes(), spc_select_error_params(), spc_select_write_params(), spc_sense_write_params(), spc_test_unit_ready(), burn_drive::test_unit_ready, and burn_drive::unlock.
Referenced by burn_scsi_setup_drive().
int spc_test_unit_ready | ( | struct burn_drive * | d | ) |
Definition at line 143 of file spc.c.
References spc_test_unit_ready_r().
Referenced by mmc_format_unit(), and spc_setup_drive().
int spc_test_unit_ready_r | ( | struct burn_drive * | d, |
int * | key, | ||
int * | asc, | ||
int * | ascq, | ||
int * | progress | ||
) |
Definition at line 116 of file spc.c.
References burn_drive::casual_command, command::dir, command::error, burn_drive::issue_command, mmc_function_spy(), NO_TRANSFER, command::retry, scsi_init_command(), command::sense, spc_decode_sense(), and SPC_TEST_UNIT_READY.
Referenced by spc_get_erase_progress(), spc_test_unit_ready(), and spc_wait_unit_attention().
|
static |
Definition at line 454 of file spc.c.
References burn_drive_has_feature(), burn_feature_descr::data, burn_feature_descr::data_lenght, mmc_get_performance(), and mmc_get_write_performance().
Referenced by spc_sense_caps().
int spc_wait_unit_attention | ( | struct burn_drive * | d, |
int | max_sec, | ||
char * | cmd_text, | ||
int | flag | ||
) |
flag | bit0=do not wait 0.1 seconds before first test unit ready bit1=do not issue success message Wait until the drive state becomes clear or until max_usec elapsed |
Definition at line 156 of file spc.c.
References BURN_ALLOC_MEM, BURN_FREE_MEM, burn_drive::cancel, burn_drive::global_index, libdax_messenger, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_PRIO_LOW, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_SEV_SORRY, libdax_msgs_submit(), scsi_error_msg(), command::sense, and spc_test_unit_ready_r().
Referenced by mmc_close(), mmc_sync_cache(), sbc_load(), sbc_start_unit_flag(), and sbc_stop_unit().
|
extern |
Definition at line 110 of file init.c.
Referenced by burn_set_scsi_logging(), mmc_write(), scsi_eval_cmd_outcome(), scsi_log_command(), scsi_log_message(), scsi_log_reply(), and scsi_log_text().
|
extern |
PORTING : ----— OS dependent headers and definitions ---— PORTING : ---— libburn portable headers and definitions --—
Definition at line 42 of file init.c.
Referenced by burn_scsi_setup_drive(), scsi_eval_cmd_outcome(), scsi_notify_error(), spc_confirm_cd_drive(), spc_report_async_error(), spc_sense_caps_al(), and spc_wait_unit_attention().
|
static |
Definition at line 56 of file spc.c.
Referenced by spc_allow().
|
static |
Definition at line 52 of file spc.c.
Referenced by spc_inquiry().
|
static |
Definition at line 58 of file spc.c.
Referenced by spc_probe_write_modes(), spc_select_error_params(), and spc_select_write_params().
|
static |
Definition at line 57 of file spc.c.
Referenced by spc_select_write_params(), spc_sense_caps_al(), spc_sense_error_params(), and spc_sense_write_params().
|
static |
Definition at line 55 of file spc.c.
Referenced by spc_prevent().
|
static |
Definition at line 59 of file spc.c.
Referenced by spc_request_sense().
|
static |
Definition at line 60 of file spc.c.
Referenced by spc_test_unit_ready_r().