From cdbbcbb9232a0d4f444ddd8058292794c22d044a Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 5 Feb 2014 19:00:01 +0000 Subject: [PATCH] Fixed bugs introduced with previous commit --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/spc.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index b88ca90..49daa5f 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2014.02.05.124803" +#define Cdrskin_timestamP "2014.02.05.185801" diff --git a/libburn/spc.c b/libburn/spc.c index ec9bc67..b307a57 100644 --- a/libburn/spc.c +++ b/libburn/spc.c @@ -431,6 +431,9 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag) if (*alloc_len < 10) {ret = 0; goto ex;} + if (!(flag & 1)) + mmc_get_configuration(d); + BURN_ALLOC_MEM(msg, char, BURN_DRIVE_ADR_LEN + 160); BURN_ALLOC_MEM(buf, struct buffer, 1); BURN_ALLOC_MEM(c, struct command, 1); @@ -496,7 +499,7 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag) */ page_length = page[1]; old_alloc_len = *alloc_len; - *alloc_len = page_length + 10; + *alloc_len = page_length + 10 + block_descr_len; if (flag & 1) {ret = !was_error; goto ex;} if (page_length + 10 > old_alloc_len) @@ -549,8 +552,6 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag) if (!was_error) m->valid = 1; - mmc_get_configuration(d); - /* ts A61225 : end of MMC-1 , begin of MMC-3 */ if (page_length < 30) /* no write speed descriptors ? */ goto try_mmc_get_performance;