Better error message with unknown SCSI error codes
This commit is contained in:
parent
3c970efff4
commit
934f2d4c5b
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2010.01.04.135427"
|
#define Cdrskin_timestamP "2010.01.09.142642"
|
||||||
|
@ -932,6 +932,24 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
|
|||||||
int *key, int *asc, int *ascq)
|
int *key, int *asc, int *ascq)
|
||||||
{
|
{
|
||||||
char *msg;
|
char *msg;
|
||||||
|
static char key_def[16][40] = {
|
||||||
|
"(no specific error)",
|
||||||
|
"Recovered error",
|
||||||
|
"Drive not ready",
|
||||||
|
"Medium error",
|
||||||
|
"Drive error",
|
||||||
|
"Illegal request",
|
||||||
|
"Drive event",
|
||||||
|
"Data protected",
|
||||||
|
"Blank/Nonblank",
|
||||||
|
"Vendor specific code",
|
||||||
|
"Copy aborted",
|
||||||
|
"Command aborted",
|
||||||
|
"(obsolete error code)",
|
||||||
|
"Volume overflow",
|
||||||
|
"Miscompare",
|
||||||
|
"(reserved error code)",
|
||||||
|
};
|
||||||
|
|
||||||
msg= msg_data;
|
msg= msg_data;
|
||||||
*key= *asc= *ascq= -1;
|
*key= *asc= *ascq= -1;
|
||||||
@ -943,7 +961,7 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
|
|||||||
if (senselen<=0 || senselen>13)
|
if (senselen<=0 || senselen>13)
|
||||||
*ascq = sense[13];
|
*ascq = sense[13];
|
||||||
|
|
||||||
sprintf(msg, "[%X %2.2X %2.2X] ", *key, *asc, *ascq);
|
sprintf(msg, "[%X %2.2X %2.2X]", (*key) & 0xf, *asc, *ascq);
|
||||||
msg= msg + strlen(msg);
|
msg= msg + strlen(msg);
|
||||||
|
|
||||||
burn_print(12, "CONDITION: 0x%x 0x%x 0x%x on %s %s\n",
|
burn_print(12, "CONDITION: 0x%x 0x%x 0x%x on %s %s\n",
|
||||||
@ -1212,8 +1230,8 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
|
|||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
sprintf(msg_data,
|
sprintf(msg_data,
|
||||||
"Failure. See mmc3r10g.pdf: Sense Key %X ASC %2.2X ASCQ %2.2X",
|
"See MMC specs: Sense Key %X \"%s\", ASC %2.2X ASCQ %2.2X",
|
||||||
*key, *asc, *ascq);
|
*key & 0xf, key_def[(*key) & 0xf], *asc, *ascq);
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user