From cad8abef744ab8006fcc348916969060ce3b5a66 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 27 Oct 2011 09:47:29 +0000 Subject: [PATCH] Enabled optional reporting of drive replies in libcdio adapter --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/sg-libcdio.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 9555955..810cad2 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2011.10.27.091014" +#define Cdrskin_timestamP "2011.10.27.094705" diff --git a/libburn/sg-libcdio.c b/libburn/sg-libcdio.c index 6611421..e730b98 100644 --- a/libburn/sg-libcdio.c +++ b/libburn/sg-libcdio.c @@ -615,7 +615,7 @@ int sg_release(struct burn_drive *d) */ int sg_issue_command(struct burn_drive *d, struct command *c) { - int sense_valid = 0, i, timeout_ms; + int sense_valid = 0, i, timeout_ms, sense_len; int key = 0, asc = 0, ascq = 0, done = 0; time_t start_time; driver_return_code_t i_status; @@ -705,11 +705,12 @@ int sg_issue_command(struct burn_drive *d, struct command *c) done = 1; } } - if (i_status != 0 || (key || asc || ascq)) { - done = scsi_eval_cmd_outcome(d, c, fp, c->sense, 18, + 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 */