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.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

spc.h File Reference
#include "libburn.h"
Include dependency graph for spc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define Libburn_scsi_retry_usleeP   100000
 
#define Libburn_scsi_retry_incR   100000
 
#define Libburn_scsi_retry_umaX   500000
 
#define Libburn_scsi_write_retry_usleeP   0
 
#define Libburn_scsi_write_retry_incR   2000
 
#define Libburn_scsi_write_retry_umaX   25000
 
#define Libburn_scsi_default_timeouT   30000
 
#define Libburn_scsi_write_timeouT   200000
 
#define Libburn_mmc_reserve_timeouT   200000
 
#define Libburn_mmc_close_timeouT   200000
 
#define Libburn_mmc_close_noim_timeouT   3600000
 
#define Libburn_mmc_blank_timeouT   200000
 
#define Libburn_mmc_blank_noim_timeouT   18000000
 
#define Libburn_mmc_opc_timeouT   200000
 
#define Libburn_mmc_sync_timeouT   200000
 
#define Libburn_mmc_sync_noim_timeouT   3600000
 
#define Libburn_mmc_load_timeouT   300000
 

Enumerations

enum  response { RETRY , FAIL , GO_ON }
 

Functions

void spc_inquiry (struct burn_drive *)
 
void spc_prevent (struct burn_drive *)
 
void spc_allow (struct burn_drive *)
 
void spc_sense_caps (struct burn_drive *)
 
void spc_sense_error_params (struct burn_drive *)
 
void spc_select_error_params (struct burn_drive *, const struct burn_read_opts *)
 
void spc_getcaps (struct burn_drive *d)
 
void spc_sense_write_params (struct burn_drive *)
 
void spc_select_write_params (struct burn_drive *, struct burn_session *, int, const struct burn_write_opts *)
 
void spc_probe_write_modes (struct burn_drive *)
 
void spc_request_sense (struct burn_drive *d, struct buffer *buf)
 
int spc_block_type (enum burn_block_types b)
 
int spc_get_erase_progress (struct burn_drive *d)
 
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)
 
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 (struct burn_drive *, unsigned char *, int)
 
enum response scsi_error_msg (struct burn_drive *d, unsigned char *sense, int senselen, char msg[161], int *key, int *asc, int *ascq)
 
int scsi_notify_error (struct burn_drive *, struct command *c, unsigned char *sense, int senselen, int flag)
 
int scsi_init_command (struct command *c, unsigned char *opcode, int oplen)
 
int scsi_show_cmd_text (struct command *c, void *fp, 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, 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, unsigned char sense[18], int sense_len, int flag)
 
int scsi_log_message (struct burn_drive *d, void *fp, char *msg, int flag)
 
int spc_decode_sense (unsigned char *sense, int senselen, int *key, int *asc, int *ascq)
 
char * spc_command_name (unsigned int c, int flag)
 
int spc_human_readable_cmd (struct command *c, char *msg, int msg_max, int flag)
 
void spc_register_retry (struct command *c)
 
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)
 
int spc_confirm_cd_drive (struct burn_drive *d, int flag)
 

Macro Definition Documentation

◆ Libburn_mmc_blank_noim_timeouT

#define Libburn_mmc_blank_noim_timeouT   18000000

Definition at line 177 of file spc.h.

◆ Libburn_mmc_blank_timeouT

#define Libburn_mmc_blank_timeouT   200000

Definition at line 175 of file spc.h.

◆ Libburn_mmc_close_noim_timeouT

#define Libburn_mmc_close_noim_timeouT   3600000

Definition at line 172 of file spc.h.

◆ Libburn_mmc_close_timeouT

#define Libburn_mmc_close_timeouT   200000

Definition at line 170 of file spc.h.

◆ Libburn_mmc_load_timeouT

#define Libburn_mmc_load_timeouT   300000

Definition at line 188 of file spc.h.

◆ Libburn_mmc_opc_timeouT

#define Libburn_mmc_opc_timeouT   200000

Definition at line 180 of file spc.h.

◆ Libburn_mmc_reserve_timeouT

#define Libburn_mmc_reserve_timeouT   200000

Definition at line 167 of file spc.h.

◆ Libburn_mmc_sync_noim_timeouT

#define Libburn_mmc_sync_noim_timeouT   3600000

Definition at line 185 of file spc.h.

◆ Libburn_mmc_sync_timeouT

#define Libburn_mmc_sync_timeouT   200000

Definition at line 183 of file spc.h.

◆ Libburn_scsi_default_timeouT

#define Libburn_scsi_default_timeouT   30000

Definition at line 161 of file spc.h.

◆ Libburn_scsi_retry_incR

#define Libburn_scsi_retry_incR   100000

Definition at line 149 of file spc.h.

◆ Libburn_scsi_retry_umaX

#define Libburn_scsi_retry_umaX   500000

Definition at line 150 of file spc.h.

◆ Libburn_scsi_retry_usleeP

#define Libburn_scsi_retry_usleeP   100000

Definition at line 148 of file spc.h.

◆ Libburn_scsi_write_retry_incR

#define Libburn_scsi_write_retry_incR   2000

Definition at line 155 of file spc.h.

◆ Libburn_scsi_write_retry_umaX

#define Libburn_scsi_write_retry_umaX   25000

Definition at line 156 of file spc.h.

◆ Libburn_scsi_write_retry_usleeP

#define Libburn_scsi_write_retry_usleeP   0

Definition at line 154 of file spc.h.

◆ Libburn_scsi_write_timeouT

#define Libburn_scsi_write_timeouT   200000

Definition at line 164 of file spc.h.

Enumeration Type Documentation

◆ response

enum response
Enumerator
RETRY 
FAIL 
GO_ON 

Definition at line 59 of file spc.h.

Function Documentation

◆ burn_scsi_setup_drive()

◆ scsi_error()

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().

◆ scsi_error_msg()

enum response scsi_error_msg ( struct burn_drive d,
unsigned char *  sense,
int  senselen,
char  msg[161],
int *  key,
int *  asc,
int *  ascq 
)

◆ scsi_eval_cmd_outcome()

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 
)

◆ scsi_init_command()

◆ scsi_log_cmd()

int scsi_log_cmd ( struct command c,
void *  fp_in,
int  flag 
)

Legacy frontend to scsi_log_command()

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().

◆ scsi_log_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).

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().

◆ scsi_log_err()

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().

Parameters
flagbit0 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().

◆ scsi_log_message()

int scsi_log_message ( struct burn_drive d,
void *  fp,
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().

◆ scsi_log_reply()

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.

Parameters
flagbit0 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().

◆ scsi_log_text()

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().

◆ scsi_notify_error()

◆ scsi_show_cmd_text()

int scsi_show_cmd_text ( struct command c,
void *  fp,
int  flag 
)

◆ spc_allow()

◆ spc_block_type()

◆ spc_command_name()

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().

◆ spc_confirm_cd_drive()

◆ spc_decode_sense()

int spc_decode_sense ( unsigned char *  sense,
int  senselen,
int *  key,
int *  asc,
int *  ascq 
)

◆ spc_get_erase_progress()

int spc_get_erase_progress ( struct burn_drive d)

◆ spc_getcaps()

◆ spc_human_readable_cmd()

◆ spc_inquiry()

◆ spc_prevent()

◆ spc_probe_write_modes()

◆ spc_register_retry()

void spc_register_retry ( struct command c)

◆ spc_request_sense()

◆ spc_select_error_params()

◆ spc_select_write_params()

◆ spc_sense_caps()

void spc_sense_caps ( struct burn_drive d)

◆ spc_sense_error_params()

◆ spc_sense_write_params()

◆ spc_setup_drive()

◆ spc_test_unit_ready()

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().

◆ spc_test_unit_ready_r()

int spc_test_unit_ready_r ( struct burn_drive d,
int *  key,
int *  asc,
int *  ascq,
int *  progress 
)

◆ spc_wait_unit_attention()

int spc_wait_unit_attention ( struct burn_drive d,
int  max_sec,
char *  cmd_text,
int  flag 
)

Wait until the drive state becomes clear in or until max_sec elapsed

Parameters
flagbit0=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().