From 5cbc7fe6ac8959922ca9e82a4fe359e03d49d646 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 27 Oct 2011 16:14:13 +0000 Subject: [PATCH] Enabled optional reporting of drive replies in Solaris adapter --- libburn/trunk/libburn/sg-solaris.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libburn/trunk/libburn/sg-solaris.c b/libburn/trunk/libburn/sg-solaris.c index bc4f22c3..debc5976 100644 --- a/libburn/trunk/libburn/sg-solaris.c +++ b/libburn/trunk/libburn/sg-solaris.c @@ -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 */