From d5ecb382aa2549042c2e0001d395dbec905a60f2 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 2 Aug 2010 13:20:33 +0000 Subject: [PATCH] Added error simulation code to Linux system adapter. --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/sg-linux.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index ca90edc..ea76e46 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2010.08.02.100630" +#define Cdrskin_timestamP "2010.08.02.131946" diff --git a/libburn/sg-linux.c b/libburn/sg-linux.c index 682943c..b17c582 100644 --- a/libburn/sg-linux.c +++ b/libburn/sg-linux.c @@ -1892,6 +1892,24 @@ int sg_issue_command(struct burn_drive *d, struct command *c) return -1; } +#ifdef NIX +/* <<< */ +if(0){ + static int erst= 1; + static unsigned char b00_sense[22]= { + 0x72, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, + 0x09, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + if (erst > 0) { + s.sb_len_wr= 22; + memcpy(s.sbp, b00_sense, s.sb_len_wr); + erst--; + } +} +/* <<< */ +#endif /* NIX */ + if (s.sb_len_wr) { if (!c->retry) { c->error = 1;