diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sg_cmds_basic.c | 2 | ||||
-rw-r--r-- | lib/sg_lib.c | 4 | ||||
-rw-r--r-- | lib/sg_lib_data.c | 4 |
3 files changed, 9 insertions, 1 deletions
diff --git a/lib/sg_cmds_basic.c b/lib/sg_cmds_basic.c index 4dffe1ce..01ca55c1 100644 --- a/lib/sg_cmds_basic.c +++ b/lib/sg_cmds_basic.c @@ -126,6 +126,8 @@ sg_cmds_process_helper(const char * leadin, int req_din_x, int act_din_x, case SG_LIB_CAT_PROTECTION: case SG_LIB_CAT_NO_SENSE: case SG_LIB_CAT_MISCOMPARE: + case SG_LIB_CAT_STANDBY: + case SG_LIB_CAT_UNAVAILABLE: n = false; break; case SG_LIB_CAT_RECOVERED: diff --git a/lib/sg_lib.c b/lib/sg_lib.c index f0ed986f..36fcf5cd 100644 --- a/lib/sg_lib.c +++ b/lib/sg_lib.c @@ -2244,6 +2244,10 @@ sg_err_category_sense(const uint8_t * sbp, int sb_len) case SPC_SK_RECOVERED_ERROR: return SG_LIB_CAT_RECOVERED; case SPC_SK_NOT_READY: + if ((0x04 == ssh.asc) && (0x0b == ssh.ascq)) + return SG_LIB_CAT_STANDBY; + if ((0x04 == ssh.asc) && (0x0c == ssh.ascq)) + return SG_LIB_CAT_UNAVAILABLE; return SG_LIB_CAT_NOT_READY; case SPC_SK_MEDIUM_ERROR: case SPC_SK_HARDWARE_ERROR: diff --git a/lib/sg_lib_data.c b/lib/sg_lib_data.c index 944c86c3..f875fabc 100644 --- a/lib/sg_lib_data.c +++ b/lib/sg_lib_data.c @@ -19,7 +19,7 @@ #include "sg_lib_data.h" -const char * sg_lib_version_str = "2.94 20221007"; +const char * sg_lib_version_str = "2.95 20221104"; /* spc6r06, sbc5r03, zbc2r13 */ @@ -1911,6 +1911,8 @@ struct sg_value_2names_t sg_exit_str_arr[] = { {10, "Copy aborted", "type: sense key"}, {11, "Aborted command", "type: sense key, other than protection related (asc=0x10)"}, + {12, "Device not ready, standby", "type: sense key"}, + {13, "Device not ready, unavailable", "type: sense key"}, {14, "Miscompare", "type: sense key"}, {15, "File error", NULL}, {17, "Illegal request with Info field", NULL}, |