Enabled optional reporting of drive replies in Solaris adapter

This commit is contained in:
Thomas Schmitt 2011-10-27 16:14:13 +00:00
parent cad8abef74
commit a247f7e7e9
1 changed files with 6 additions and 5 deletions

View File

@ -579,7 +579,7 @@ int sg_release(struct burn_drive *d)
*/
int sg_issue_command(struct burn_drive *d, struct command *c)
{
int i, timeout_ms, ret, key, asc, ascq, done = 0;
int i, timeout_ms, ret, key, asc, ascq, done = 0, sense_len;
time_t start_time;
struct uscsi_cmd cgc;
char msg[80];
@ -660,11 +660,12 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
/* >>> valid sense: cgc.uscsi_rqlen - cgc.uscsi_rqresid */;
spc_decode_sense(c->sense, 0, &key, &asc, &ascq);
if (key || asc || ascq) {
done = scsi_eval_cmd_outcome(d, c, fp, c->sense, 18, 0,
if (key || asc || ascq)
sense_len = 18;
else
sense_len = 0;
done = scsi_eval_cmd_outcome(d, c, fp, c->sense, sense_len, 0,
start_time, timeout_ms, i, 2);
} else
done = 1;
} /* end of retry-loop */