test-tool, check_result(): Make failure output more informative
If a SCSI command fails, report the SCSI status code. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
This commit is contained in:
@@ -204,9 +204,9 @@ static int check_result(const char *opcode, struct scsi_device *sdev,
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
if (status == SCSI_STATUS_GOOD && task->status != SCSI_STATUS_GOOD) {
|
if (status == SCSI_STATUS_GOOD && task->status != SCSI_STATUS_GOOD) {
|
||||||
logging(LOG_NORMAL, "[FAILED] %s command failed with "
|
logging(LOG_NORMAL,
|
||||||
"sense. %s(0x%02x)/%s(0x%04x)",
|
"[FAILED] %s command failed with status %d / sense key %s(0x%02x) / ASCQ %s(0x%04x)",
|
||||||
opcode,
|
opcode, task->status,
|
||||||
scsi_sense_key_str(task->sense.key), task->sense.key,
|
scsi_sense_key_str(task->sense.key), task->sense.key,
|
||||||
scsi_sense_ascq_str(task->sense.ascq), task->sense.ascq);
|
scsi_sense_ascq_str(task->sense.ascq), task->sense.ascq);
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user