smartmontools SVN Rev 5409
Utility to control and monitor storage systems with "S.M.A.R.T."
Classes | Macros | Enumerations | Functions | Variables
scsicmds.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include "config.h"
#include "scsicmds.h"
#include "dev_interface.h"
#include "utility.h"
#include "sg_unaligned.h"
Include dependency graph for scsicmds.cpp:

Go to the source code of this file.

Classes

struct  scsi_sa_var_map
 
struct  scsi_opcode_name
 

Macros

#define DEXCPT_ENABLE   0x08
 
#define EWASC_ENABLE   0x10
 
#define DEXCPT_DISABLE   0xf7
 
#define EWASC_DISABLE   0xef
 
#define TEST_DISABLE   0xfb
 
#define SCSI_IEC_MP_BYTE2_ENABLED   0x10
 
#define SCSI_IEC_MP_BYTE2_TEST_MASK   0x4
 
#define SCSI_IEC_MP_MRIE   6
 
#define SCSI_IEC_MP_INTERVAL_T   0
 
#define SCSI_IEC_MP_REPORT_COUNT   1
 

Enumerations

enum  scsi_sa_t { scsi_sa_none = 0 , scsi_sa_b1b4n5 , scsi_sa_b8b7n16 }
 

Functions

void dStrHex (const uint8_t *up, int len, int no_ascii)
 
bool is_scsi_cdb (const uint8_t *cdbp, int clen)
 
const char * scsi_get_opcode_name (const uint8_t *cdbp)
 
void scsi_do_sense_disect (const struct scsi_cmnd_io *io_buf, struct scsi_sense_disect *out)
 
int scsiSimpleSenseFilter (const struct scsi_sense_disect *sinfo)
 
const char * scsiErrString (int scsiErr)
 
char * scsi_get_sense_key_str (int sense_key, int buff_len, char *buff)
 
int scsi_vpd_dev_id_iter (const unsigned char *initial_desig_desc, int page_len, int *off, int m_assoc, int m_desig_type, int m_code_set)
 
int scsi_decode_lu_dev_id (const unsigned char *b, int blen, char *s, int slen, int *transport)
 
int scsiLogSense (scsi_device *device, int pagenum, int subpagenum, uint8_t *pBuf, int bufLen, int known_resp_len)
 
int scsiLogSelect (scsi_device *device, int pcr, int sp, int pc, int pagenum, int subpagenum, uint8_t *pBuf, int bufLen)
 
int scsiModeSense (scsi_device *device, int pagenum, int subpagenum, int pc, uint8_t *pBuf, int bufLen)
 
int scsiModeSelect (scsi_device *device, int sp, uint8_t *pBuf, int bufLen)
 
int scsiModeSense10 (scsi_device *device, int pagenum, int subpagenum, int pc, uint8_t *pBuf, int bufLen)
 
int scsiModeSelect10 (scsi_device *device, int sp, uint8_t *pBuf, int bufLen)
 
int scsiStdInquiry (scsi_device *device, uint8_t *pBuf, int bufLen)
 
int scsiInquiryVpd (scsi_device *device, int vpd_page, uint8_t *pBuf, int bufLen)
 
int scsiRequestSense (scsi_device *device, struct scsi_sense_disect *sense_info)
 
int scsiSetPowerCondition (scsi_device *device, int power_cond, int pcond_modifier)
 
int scsiSendDiagnostic (scsi_device *device, int functioncode, uint8_t *pBuf, int bufLen)
 
static int _testunitready (scsi_device *device, struct scsi_sense_disect *sinfop)
 
int scsiTestUnitReady (scsi_device *device)
 
int scsiReadDefect10 (scsi_device *device, int req_plist, int req_glist, int dl_format, uint8_t *pBuf, int bufLen)
 
int scsiReadDefect12 (scsi_device *device, int req_plist, int req_glist, int dl_format, int addrDescIndex, uint8_t *pBuf, int bufLen)
 
bool scsi_pass_through_yield_sense (scsi_device *device, scsi_cmnd_io *iop, scsi_sense_disect &sinfo)
 
int scsiReadCapacity10 (scsi_device *device, unsigned int *last_lbap, unsigned int *lb_sizep)
 
int scsiReadCapacity16 (scsi_device *device, uint8_t *pBuf, int bufLen)
 
int scsiRSOCcmd (scsi_device *device, uint8_t *pBuf, int bufLen, int &rspLen)
 
uint64_t scsiGetSize (scsi_device *device, bool avoid_rcap16, struct scsi_readcap_resp *srrp)
 
int scsiModePageOffset (const uint8_t *resp, int len, int modese_len)
 
int scsiFetchIECmpage (scsi_device *device, struct scsi_iec_mode_page *iecp, int modese_len)
 
int scsi_IsExceptionControlEnabled (const struct scsi_iec_mode_page *iecp)
 
int scsi_IsWarningEnabled (const struct scsi_iec_mode_page *iecp)
 
int scsiSetExceptionControlAndWarning (scsi_device *device, int enabled, const struct scsi_iec_mode_page *iecp)
 
int scsiGetTemp (scsi_device *device, uint8_t *currenttemp, uint8_t *triptemp)
 
int scsiCheckIE (scsi_device *device, int hasIELogPage, int hasTempLogPage, uint8_t *asc, uint8_t *ascq, uint8_t *currenttemp, uint8_t *triptemp)
 
const char * scsiTapeAlertsTapeDevice (unsigned short code)
 
const char * scsiTapeAlertsChangerDevice (unsigned short code)
 
int scsiSmartDefaultSelfTest (scsi_device *device)
 
int scsiSmartShortSelfTest (scsi_device *device)
 
int scsiSmartExtendSelfTest (scsi_device *device)
 
int scsiSmartShortCapSelfTest (scsi_device *device)
 
int scsiSmartExtendCapSelfTest (scsi_device *device)
 
int scsiSmartSelfTestAbort (scsi_device *device)
 
int scsiFetchExtendedSelfTestTime (scsi_device *device, int *durationSec, int modese_len)
 
void scsiDecodeErrCounterPage (unsigned char *resp, struct scsiErrorCounter *ecp)
 
void scsiDecodeNonMediumErrPage (unsigned char *resp, struct scsiNonMediumError *nmep)
 
int scsiCountFailedSelfTests (scsi_device *fd, int noisy)
 
int scsiSelfTestInProgress (scsi_device *fd, int *inProgress)
 
int scsiFetchControlGLTSD (scsi_device *device, int modese_len, int current)
 
int scsiGetRPM (scsi_device *device, int modese_len, int *form_factorp, int *haw_zbcp)
 
int scsiGetSetCache (scsi_device *device, int modese_len, short int *wcep, short int *rcdp)
 
int scsiSetControlGLTSD (scsi_device *device, int enabled, int modese_len)
 
int scsiFetchTransportProtocol (scsi_device *device, int modese_len)
 
const unsigned char * sg_scsi_sense_desc_find (const unsigned char *sensep, int sense_len, int desc_type)
 
void scsi_format_id_string (char *out, const uint8_t *in, int n)
 
char * scsiGetIEString (uint8_t asc, uint8_t ascq, char *b, int blen)
 

Variables

const char * scsicmds_c_cvsid
 
static const char * logSenStr = "Log Sense"
 
unsigned char scsi_debugmode = 0
 
supported_vpd_pagessupported_vpd_pages_p = NULL
 
static struct scsi_sa_var_map sa_var_a []
 
static struct scsi_opcode_name opcode_name_arr []
 
static const char * vendor_specific = "<vendor specific>"
 
static const char * sense_key_desc []
 
static const char * TapeAlertsMessageTable []
 
static const char * ChangerTapeAlertsMessageTable []
 
static const char * wn = "Warning"
 
static const char * wn1_9 []
 
static const char * five_d_t []
 
static const char * impfail = "impending failure"
 
static const char * impending0_c []
 
static const char * pred = "prediction threshold exceeded"
 

Macro Definition Documentation

◆ DEXCPT_DISABLE

#define DEXCPT_DISABLE   0xf7

Definition at line 1552 of file scsicmds.cpp.

◆ DEXCPT_ENABLE

#define DEXCPT_ENABLE   0x08

Definition at line 1550 of file scsicmds.cpp.

◆ EWASC_DISABLE

#define EWASC_DISABLE   0xef

Definition at line 1553 of file scsicmds.cpp.

◆ EWASC_ENABLE

#define EWASC_ENABLE   0x10

Definition at line 1551 of file scsicmds.cpp.

◆ SCSI_IEC_MP_BYTE2_ENABLED

#define SCSI_IEC_MP_BYTE2_ENABLED   0x10

Definition at line 1637 of file scsicmds.cpp.

◆ SCSI_IEC_MP_BYTE2_TEST_MASK

#define SCSI_IEC_MP_BYTE2_TEST_MASK   0x4

Definition at line 1638 of file scsicmds.cpp.

◆ SCSI_IEC_MP_INTERVAL_T

#define SCSI_IEC_MP_INTERVAL_T   0

Definition at line 1641 of file scsicmds.cpp.

◆ SCSI_IEC_MP_MRIE

#define SCSI_IEC_MP_MRIE   6

Definition at line 1640 of file scsicmds.cpp.

◆ SCSI_IEC_MP_REPORT_COUNT

#define SCSI_IEC_MP_REPORT_COUNT   1

Definition at line 1642 of file scsicmds.cpp.

◆ TEST_DISABLE

#define TEST_DISABLE   0xfb

Definition at line 1554 of file scsicmds.cpp.

Enumeration Type Documentation

◆ scsi_sa_t

enum scsi_sa_t
Enumerator
scsi_sa_none 
scsi_sa_b1b4n5 
scsi_sa_b8b7n16 

Definition at line 200 of file scsicmds.cpp.

Function Documentation

◆ _testunitready()

static int _testunitready ( scsi_device device,
struct scsi_sense_disect sinfop 
)
static

Definition at line 1185 of file scsicmds.cpp.

◆ dStrHex()

void dStrHex ( const uint8_t *  up,
int  len,
int  no_ascii 
)

Definition at line 78 of file scsicmds.cpp.

◆ is_scsi_cdb()

bool is_scsi_cdb ( const uint8_t *  cdbp,
int  clen 
)

Definition at line 151 of file scsicmds.cpp.

◆ scsi_decode_lu_dev_id()

int scsi_decode_lu_dev_id ( const unsigned char *  b,
int  blen,
char *  s,
int  slen,
int *  transport 
)

Definition at line 507 of file scsicmds.cpp.

◆ scsi_do_sense_disect()

void scsi_do_sense_disect ( const struct scsi_cmnd_io io_buf,
struct scsi_sense_disect out 
)

Definition at line 325 of file scsicmds.cpp.

◆ scsi_format_id_string()

void scsi_format_id_string ( char *  out,
const uint8_t *  in,
int  n 
)

Definition at line 2825 of file scsicmds.cpp.

◆ scsi_get_opcode_name()

const char * scsi_get_opcode_name ( const uint8_t *  cdbp)

Definition at line 271 of file scsicmds.cpp.

◆ scsi_get_sense_key_str()

char * scsi_get_sense_key_str ( int  sense_key,
int  buff_len,
char *  buff 
)

Definition at line 455 of file scsicmds.cpp.

◆ scsi_IsExceptionControlEnabled()

int scsi_IsExceptionControlEnabled ( const struct scsi_iec_mode_page iecp)

Definition at line 1609 of file scsicmds.cpp.

◆ scsi_IsWarningEnabled()

int scsi_IsWarningEnabled ( const struct scsi_iec_mode_page iecp)

Definition at line 1623 of file scsicmds.cpp.

◆ scsi_pass_through_yield_sense()

bool scsi_pass_through_yield_sense ( scsi_device device,
scsi_cmnd_io iop,
scsi_sense_disect sinfo 
)

Definition at line 1303 of file scsicmds.cpp.

◆ scsi_vpd_dev_id_iter()

int scsi_vpd_dev_id_iter ( const unsigned char *  initial_desig_desc,
int  page_len,
int *  off,
int  m_assoc,
int  m_desig_type,
int  m_code_set 
)

Definition at line 478 of file scsicmds.cpp.

◆ scsiCheckIE()

int scsiCheckIE ( scsi_device device,
int  hasIELogPage,
int  hasTempLogPage,
uint8_t *  asc,
uint8_t *  ascq,
uint8_t *  currenttemp,
uint8_t *  triptemp 
)

Definition at line 1750 of file scsicmds.cpp.

◆ scsiCountFailedSelfTests()

int scsiCountFailedSelfTests ( scsi_device fd,
int  noisy 
)

Definition at line 2430 of file scsicmds.cpp.

◆ scsiDecodeErrCounterPage()

void scsiDecodeErrCounterPage ( unsigned char *  resp,
struct scsiErrorCounter ecp 
)

Definition at line 2331 of file scsicmds.cpp.

◆ scsiDecodeNonMediumErrPage()

void scsiDecodeNonMediumErrPage ( unsigned char *  resp,
struct scsiNonMediumError nmep 
)

Definition at line 2369 of file scsicmds.cpp.

◆ scsiErrString()

const char * scsiErrString ( int  scsiErr)

Definition at line 390 of file scsicmds.cpp.

◆ scsiFetchControlGLTSD()

int scsiFetchControlGLTSD ( scsi_device device,
int  modese_len,
int  current 
)

Definition at line 2509 of file scsicmds.cpp.

◆ scsiFetchExtendedSelfTestTime()

int scsiFetchExtendedSelfTestTime ( scsi_device device,
int *  durationSec,
int  modese_len 
)

Definition at line 2279 of file scsicmds.cpp.

◆ scsiFetchIECmpage()

int scsiFetchIECmpage ( scsi_device device,
struct scsi_iec_mode_page iecp,
int  modese_len 
)

Definition at line 1562 of file scsicmds.cpp.

◆ scsiFetchTransportProtocol()

int scsiFetchTransportProtocol ( scsi_device device,
int  modese_len 
)

Definition at line 2765 of file scsicmds.cpp.

◆ scsiGetIEString()

char * scsiGetIEString ( uint8_t  asc,
uint8_t  ascq,
char *  b,
int  blen 
)

Definition at line 2906 of file scsicmds.cpp.

◆ scsiGetRPM()

int scsiGetRPM ( scsi_device device,
int  modese_len,
int *  form_factorp,
int *  haw_zbcp 
)

Definition at line 2546 of file scsicmds.cpp.

◆ scsiGetSetCache()

int scsiGetSetCache ( scsi_device device,
int  modese_len,
short int *  wcep,
short int *  rcdp 
)

Definition at line 2591 of file scsicmds.cpp.

◆ scsiGetSize()

uint64_t scsiGetSize ( scsi_device device,
bool  avoid_rcap16,
struct scsi_readcap_resp srrp 
)

Definition at line 1441 of file scsicmds.cpp.

◆ scsiGetTemp()

int scsiGetTemp ( scsi_device device,
uint8_t *  currenttemp,
uint8_t *  triptemp 
)

Definition at line 1722 of file scsicmds.cpp.

◆ scsiInquiryVpd()

int scsiInquiryVpd ( scsi_device device,
int  vpd_page,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 970 of file scsicmds.cpp.

◆ scsiLogSelect()

int scsiLogSelect ( scsi_device device,
int  pcr,
int  sp,
int  pc,
int  pagenum,
int  subpagenum,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 722 of file scsicmds.cpp.

◆ scsiLogSense()

int scsiLogSense ( scsi_device device,
int  pagenum,
int  subpagenum,
uint8_t *  pBuf,
int  bufLen,
int  known_resp_len 
)

Definition at line 633 of file scsicmds.cpp.

◆ scsiModePageOffset()

int scsiModePageOffset ( const uint8_t *  resp,
int  len,
int  modese_len 
)

Definition at line 1519 of file scsicmds.cpp.

◆ scsiModeSelect()

int scsiModeSelect ( scsi_device device,
int  sp,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 800 of file scsicmds.cpp.

◆ scsiModeSelect10()

int scsiModeSelect10 ( scsi_device device,
int  sp,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 883 of file scsicmds.cpp.

◆ scsiModeSense()

int scsiModeSense ( scsi_device device,
int  pagenum,
int  subpagenum,
int  pc,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 754 of file scsicmds.cpp.

◆ scsiModeSense10()

int scsiModeSense10 ( scsi_device device,
int  pagenum,
int  subpagenum,
int  pc,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 839 of file scsicmds.cpp.

◆ scsiReadCapacity10()

int scsiReadCapacity10 ( scsi_device device,
unsigned int *  last_lbap,
unsigned int *  lb_sizep 
)

Definition at line 1342 of file scsicmds.cpp.

◆ scsiReadCapacity16()

int scsiReadCapacity16 ( scsi_device device,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 1378 of file scsicmds.cpp.

◆ scsiReadDefect10()

int scsiReadDefect10 ( scsi_device device,
int  req_plist,
int  req_glist,
int  dl_format,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 1232 of file scsicmds.cpp.

◆ scsiReadDefect12()

int scsiReadDefect12 ( scsi_device device,
int  req_plist,
int  req_glist,
int  dl_format,
int  addrDescIndex,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 1266 of file scsicmds.cpp.

◆ scsiRequestSense()

int scsiRequestSense ( scsi_device device,
struct scsi_sense_disect sense_info 
)

Definition at line 1028 of file scsicmds.cpp.

◆ scsiRSOCcmd()

int scsiRSOCcmd ( scsi_device device,
uint8_t *  pBuf,
int  bufLen,
int &  rspLen 
)

Definition at line 1405 of file scsicmds.cpp.

◆ scsiSelfTestInProgress()

int scsiSelfTestInProgress ( scsi_device fd,
int *  inProgress 
)

Definition at line 2481 of file scsicmds.cpp.

◆ scsiSendDiagnostic()

int scsiSendDiagnostic ( scsi_device device,
int  functioncode,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 1152 of file scsicmds.cpp.

◆ scsiSetControlGLTSD()

int scsiSetControlGLTSD ( scsi_device device,
int  enabled,
int  modese_len 
)

Definition at line 2695 of file scsicmds.cpp.

◆ scsiSetExceptionControlAndWarning()

int scsiSetExceptionControlAndWarning ( scsi_device device,
int  enabled,
const struct scsi_iec_mode_page iecp 
)

Definition at line 1652 of file scsicmds.cpp.

◆ scsiSetPowerCondition()

int scsiSetPowerCondition ( scsi_device device,
int  power_cond,
int  pcond_modifier 
)

Definition at line 1121 of file scsicmds.cpp.

◆ scsiSimpleSenseFilter()

int scsiSimpleSenseFilter ( const struct scsi_sense_disect sinfo)

Definition at line 347 of file scsicmds.cpp.

◆ scsiSmartDefaultSelfTest()

int scsiSmartDefaultSelfTest ( scsi_device device)

Definition at line 2209 of file scsicmds.cpp.

◆ scsiSmartExtendCapSelfTest()

int scsiSmartExtendCapSelfTest ( scsi_device device)

Definition at line 2254 of file scsicmds.cpp.

◆ scsiSmartExtendSelfTest()

int scsiSmartExtendSelfTest ( scsi_device device)

Definition at line 2231 of file scsicmds.cpp.

◆ scsiSmartSelfTestAbort()

int scsiSmartSelfTestAbort ( scsi_device device)

Definition at line 2266 of file scsicmds.cpp.

◆ scsiSmartShortCapSelfTest()

int scsiSmartShortCapSelfTest ( scsi_device device)

Definition at line 2243 of file scsicmds.cpp.

◆ scsiSmartShortSelfTest()

int scsiSmartShortSelfTest ( scsi_device device)

Definition at line 2220 of file scsicmds.cpp.

◆ scsiStdInquiry()

int scsiStdInquiry ( scsi_device device,
uint8_t *  pBuf,
int  bufLen 
)

Definition at line 923 of file scsicmds.cpp.

◆ scsiTapeAlertsChangerDevice()

const char * scsiTapeAlertsChangerDevice ( unsigned short  code)

Definition at line 2199 of file scsicmds.cpp.

◆ scsiTapeAlertsTapeDevice()

const char * scsiTapeAlertsTapeDevice ( unsigned short  code)

Definition at line 2051 of file scsicmds.cpp.

◆ scsiTestUnitReady()

int scsiTestUnitReady ( scsi_device device)

Definition at line 1216 of file scsicmds.cpp.

◆ sg_scsi_sense_desc_find()

const unsigned char * sg_scsi_sense_desc_find ( const unsigned char *  sensep,
int  sense_len,
int  desc_type 
)

Definition at line 2798 of file scsicmds.cpp.

Variable Documentation

◆ ChangerTapeAlertsMessageTable

const char* ChangerTapeAlertsMessageTable[]
static

Definition at line 2060 of file scsicmds.cpp.

◆ five_d_t

const char* five_d_t[]
static
Initial value:
= {
"Hardware",
"Controller",
"Data channel",
"Servo",
"Spindle",
"Firmware",
}

Definition at line 2869 of file scsicmds.cpp.

◆ impending0_c

const char* impending0_c[]
static
Initial value:
= {
"general hard drive failure",
"drive error rate too high",
"data error rate too high",
"seek error rate too high",
"too many block reassigns",
"access times too high",
"start unit times too high",
"channel parametrics",
"controller detected",
"throughput performance",
"seek time performance",
"spin-up retry count",
"drive calibration retry count",
}

Definition at line 2880 of file scsicmds.cpp.

◆ impfail

const char* impfail = "impending failure"
static

Definition at line 2878 of file scsicmds.cpp.

◆ logSenStr

const char* logSenStr = "Log Sense"
static

Definition at line 42 of file scsicmds.cpp.

◆ opcode_name_arr

struct scsi_opcode_name opcode_name_arr[]
static
Initial value:
= {
{TEST_UNIT_READY, false, 0, "test unit ready"},
{REQUEST_SENSE, false, 0, "request sense"},
{INQUIRY, false, 0, "inquiry"},
{MODE_SELECT_6, false, 0, "mode select(6)"},
{MODE_SENSE_6, false, 0, "mode sense(6)"},
{START_STOP_UNIT, false, 0, "start stop unit"},
{RECEIVE_DIAGNOSTIC, false, 0, "receive diagnostic"},
{SEND_DIAGNOSTIC, false, 0, "send diagnostic"},
{READ_CAPACITY_10, false, 0, "read capacity(10)"},
{READ_DEFECT_10, false, 0, "read defect list(10)"},
{LOG_SELECT, false, 0, "log select"},
{LOG_SENSE, false, 0, "log sense"},
{MODE_SELECT_10, false, 0, "mode select(10)"},
{MODE_SENSE_10, false, 0, "mode sense(10)"},
{SAT_ATA_PASSTHROUGH_16, false, 0, "ata pass-through(16)"},
{SERVICE_ACTION_IN_16, true, SAI_READ_CAPACITY_16, "read capacity(16)"},
"get physical element status"},
{REPORT_LUNS, false, 0, "report luns"},
{SAT_ATA_PASSTHROUGH_12, false, 0, "ata pass-through(12)"},
"report supported operation codes"},
{READ_DEFECT_12, false, 0, "read defect list(12)"},
}
#define REPORT_LUNS
Definition: scsicmds.h:76
#define START_STOP_UNIT
Definition: scsicmds.h:73
#define SAI_READ_CAPACITY_16
Definition: scsicmds.h:85
#define MODE_SENSE_6
Definition: scsicmds.h:43
#define SAI_GET_PHY_ELEM_STATUS
Definition: scsicmds.h:88
#define READ_CAPACITY_10
Definition: scsicmds.h:79
#define MAINTENANCE_IN_12
Definition: scsicmds.h:91
#define MI_REP_SUP_OPCODES
Definition: scsicmds.h:94
#define SAT_ATA_PASSTHROUGH_12
Definition: scsicmds.h:98
#define SEND_DIAGNOSTIC
Definition: scsicmds.h:64
#define READ_DEFECT_12
Definition: scsicmds.h:70
#define READ_DEFECT_10
Definition: scsicmds.h:67
#define RECEIVE_DIAGNOSTIC
Definition: scsicmds.h:61
#define MODE_SELECT_10
Definition: scsicmds.h:52
#define LOG_SENSE
Definition: scsicmds.h:40
#define MODE_SELECT_6
Definition: scsicmds.h:49
#define SAT_ATA_PASSTHROUGH_16
Definition: scsicmds.h:101
#define MODE_SENSE_10
Definition: scsicmds.h:46
#define LOG_SELECT
Definition: scsicmds.h:37
#define TEST_UNIT_READY
Definition: scsicmds.h:34
#define SERVICE_ACTION_IN_16
Definition: scsicmds.h:82
#define INQUIRY
Definition: scsicmds.h:55
#define REQUEST_SENSE
Definition: scsicmds.h:58

Definition at line 238 of file scsicmds.cpp.

◆ pred

const char* pred = "prediction threshold exceeded"
static

Definition at line 2896 of file scsicmds.cpp.

◆ sa_var_a

struct scsi_sa_var_map sa_var_a[]
static
Initial value:
= {
{0x3b, scsi_sa_b1b4n5},
{0x3c, scsi_sa_b1b4n5},
{0x48, scsi_sa_b1b4n5},
{0x5e, scsi_sa_b1b4n5},
{0x5f, scsi_sa_b1b4n5},
{0x7f, scsi_sa_b8b7n16},
{0x83, scsi_sa_b1b4n5},
{0x84, scsi_sa_b1b4n5},
{0x8c, scsi_sa_b1b4n5},
{0x9b, scsi_sa_b1b4n5},
{0x9e, scsi_sa_b1b4n5},
{0x9f, scsi_sa_b1b4n5},
{0xa3, scsi_sa_b1b4n5},
{0xa4, scsi_sa_b1b4n5},
{0xa9, scsi_sa_b1b4n5},
{0xab, scsi_sa_b1b4n5},
}
@ scsi_sa_b8b7n16
Definition: scsicmds.cpp:203
@ scsi_sa_b1b4n5
Definition: scsicmds.cpp:202

Definition at line 211 of file scsicmds.cpp.

◆ scsi_debugmode

unsigned char scsi_debugmode = 0

Definition at line 45 of file scsicmds.cpp.

◆ scsicmds_c_cvsid

const char* scsicmds_c_cvsid
Initial value:
="$Id: scsicmds.cpp 5397 2022-07-17 02:22:29Z dpgilbert $"
#define SCSICMDS_H_CVSID
Definition: scsicmds.h:22

Definition at line 39 of file scsicmds.cpp.

◆ sense_key_desc

const char* sense_key_desc[]
static
Initial value:
= {
"No Sense",
"Recovered Error",
"Not Ready",
"Medium Error",
"Hardware Error",
"Illegal Request",
"Unit Attention",
"Data Protect",
"Blank Check",
"Vendor specific(9)",
"Copy Aborted",
"Aborted Command",
"Equal",
"Volume Overflow",
"Miscompare",
"Completed"
}

Definition at line 428 of file scsicmds.cpp.

◆ supported_vpd_pages_p

supported_vpd_pages* supported_vpd_pages_p = NULL

Definition at line 47 of file scsicmds.cpp.

◆ TapeAlertsMessageTable

const char* TapeAlertsMessageTable[]
static

Definition at line 1807 of file scsicmds.cpp.

◆ vendor_specific

const char* vendor_specific = "<vendor specific>"
static

Definition at line 266 of file scsicmds.cpp.

◆ wn

const char* wn = "Warning"
static

Definition at line 2855 of file scsicmds.cpp.

◆ wn1_9

const char* wn1_9[]
static
Initial value:
= {
"specified temperature exceeded",
"enclosure degraded",
"background self-test failed",
"background pre-scan detected medium error",
"background medium scan detected medium error",
"non-volatile cache now volatile",
"degraded power to non-volatile cache",
"power loss expected",
"device statistics notification active",
}

Definition at line 2857 of file scsicmds.cpp.