"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/sg_lib_data.c" between
sg3_utils-1.47r908.tgz and sg3_utils-1.47r915.tar.xz

About: sg3_utils contains utilities that send SCSI commands to devices. Beta version.

sg_lib_data.c  (sg3_utils-1.47r908.tgz):sg_lib_data.c  (sg3_utils-1.47r915.tar.xz)
skipping to change at line 21 skipping to change at line 21
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#else #else
#define SG_SCSI_STRINGS 1 #define SG_SCSI_STRINGS 1
#endif #endif
#include "sg_lib.h" #include "sg_lib.h"
#include "sg_lib_data.h" #include "sg_lib_data.h"
const char * sg_lib_version_str = "2.81 20210526"; const char * sg_lib_version_str = "2.82 20210830";
/* spc6r05, sbc5r01, zbc2r10 */ /* spc6r05, sbc5r01, zbc2r10 */
/* indexed by pdt; those that map to own index do not decay */ /* indexed by pdt; those that map to own index do not decay */
int sg_lib_pdt_decay_arr[32] = { int sg_lib_pdt_decay_arr[32] = {
PDT_DISK, PDT_TAPE, PDT_TAPE /* printer */, PDT_PROCESSOR, PDT_DISK, PDT_TAPE, PDT_TAPE /* printer */, PDT_PROCESSOR,
PDT_DISK /* WO */, PDT_MMC, PDT_SCANNER, PDT_DISK /* optical */, PDT_DISK /* WO */, PDT_MMC, PDT_SCANNER, PDT_DISK /* optical */,
PDT_MCHANGER, PDT_COMMS, 0xa, 0xb, PDT_MCHANGER, PDT_COMMS, 0xa, 0xb,
PDT_SAC, PDT_SES, PDT_DISK /* rbc */, PDT_OCRW, PDT_SAC, PDT_SES, PDT_DISK /* rbc */, PDT_OCRW,
PDT_BCC, PDT_OSD, PDT_TAPE /* adc */, PDT_SMD, PDT_BCC, PDT_OSD, PDT_TAPE /* adc */, PDT_SMD,
PDT_DISK /* zbc */, 0x15, 0x16, 0x17, PDT_DISK /* zbc */, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, PDT_WLUN, PDT_UNKNOWN 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, PDT_WLUN, PDT_UNKNOWN
}; };
/* SCSI Status values */
struct sg_lib_simple_value_name_t sg_lib_sstatus_str_arr[] = {
{0x0, "Good"},
{0x2, "Check Condition"},
{0x4, "Condition Met"},
{0x8, "Busy"},
{0x10, "Intermediate (obsolete)"},
{0x14, "Intermediate-Condition Met (obsolete)"},
{0x18, "Reservation Conflict"},
{0x22, "Command terminated (obsolete)"},
{0x28, "Task Set Full"},
{0x30, "ACA Active"},
{0x40, "Task Aborted"},
{0xffff, NULL},
};
#ifdef SG_SCSI_STRINGS #ifdef SG_SCSI_STRINGS
struct sg_lib_value_name_t sg_lib_normal_opcodes[] = { struct sg_lib_value_name_t sg_lib_normal_opcodes[] = {
{0, 0, "Test Unit Ready"}, {0, 0, "Test Unit Ready"},
{0x1, 0, "Rezero Unit"}, {0x1, 0, "Rezero Unit"},
{0x1, PDT_TAPE, "Rewind"}, {0x1, PDT_TAPE, "Rewind"},
{0x3, 0, "Request Sense"}, {0x3, 0, "Request Sense"},
{0x4, 0, "Format Unit"}, {0x4, 0, "Format Unit"},
{0x4, PDT_TAPE, "Format medium"}, {0x4, PDT_TAPE, "Format medium"},
{0x4, PDT_PRINTER, "Format"}, {0x4, PDT_PRINTER, "Format"},
{0x5, 0, "Read Block Limits"}, {0x5, 0, "Read Block Limits"},
skipping to change at line 1805 skipping to change at line 1821
{22, "LBA out of range", NULL}, {22, "LBA out of range", NULL},
{24, "Reservation conflict", "type: SCSI status"}, {24, "Reservation conflict", "type: SCSI status"},
{25, "Condition met", "type: SCSI status"}, /* from PRE-FETCH command */ {25, "Condition met", "type: SCSI status"}, /* from PRE-FETCH command */
{26, "Busy", "type: SCSI status"}, /* could be transport issue */ {26, "Busy", "type: SCSI status"}, /* could be transport issue */
{27, "Task set full", "type: SCSI status"}, {27, "Task set full", "type: SCSI status"},
{28, "ACA aactive", "type: SCSI status"}, {28, "ACA aactive", "type: SCSI status"},
{29, "Task aborted", "type: SCSI status"}, {29, "Task aborted", "type: SCSI status"},
{31, "Contradict", "command line options contradict or select bad mode"}, {31, "Contradict", "command line options contradict or select bad mode"},
{32, "Logic error", "unexpected situation, contact author"}, {32, "Logic error", "unexpected situation, contact author"},
{33, "SCSI command timeout", NULL}, /* OS timed out command */ {33, "SCSI command timeout", NULL}, /* OS timed out command */
{34, "Windows error number", "doesn't fit in 7 bits"},
{35, "Transport error", "driver or interconnect error"},
{36, "No errors (false)", NULL}, {36, "No errors (false)", NULL},
{40, "Aborted command, protection error", NULL}, {40, "Aborted command, protection error", NULL},
{41, "Aborted command, protection error with Info field", NULL}, {41, "Aborted command, protection error with Info field", NULL},
{47, "flock (Unix system call) error", NULL}, /* ddpt */ {47, "flock (Unix system call) error", NULL}, /* ddpt */
{48, "NVMe command with non-zero status", NULL}, {48, "NVMe command with non-zero status", NULL},
{50, "An OS error occurred", "(errno > 46 or negative)"}, {50, "An OS error occurred", "(errno > 46 or negative)"},
/* OS errors (errno in Unix) from 1 to 46 mapped into this range */ /* OS errors (errno in Unix) from 1 to 46 mapped into this range */
{97, "Malformed SCSI command", "trouble building command"}, {97, "Malformed SCSI command", "trouble building command"},
{98, "Some other sense error", "try '-v' option for more information"}, {98, "Some other sense error", "try '-v' option for more information"},
{99, "Some other error", "possible transport of driver issue"}, {99, "Some other error", "possible transport of driver issue"},
 End of changes. 3 change blocks. 
1 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)