From 077eb50c5f2b6feb82ad5c7bb289661e6982bdc6 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 28 Sep 2010 10:11:06 +0000 Subject: [PATCH] Avoiding to inquire spare area of unsuitable media --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/mmc.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index b73b211f..707fa8a5 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2010.09.24.100255" +#define Cdrskin_timestamP "2010.09.28.101043" diff --git a/libburn/trunk/libburn/mmc.c b/libburn/trunk/libburn/mmc.c index 82b94404..d87985c0 100644 --- a/libburn/trunk/libburn/mmc.c +++ b/libburn/trunk/libburn/mmc.c @@ -4325,9 +4325,13 @@ ex:; int mmc_get_bd_spare_info(struct burn_drive *d, int *alloc_blocks, int *free_blocks, int flag) { - int ret, reply_len; + int ret, reply_len, prf; char *reply = NULL; + prf = d->current_profile; + if (!(prf == 0x41 || prf == 0x43 || prf == 0x42)) + return 0; /* Not a BD loaded */ + ret = mmc_read_disc_structure(d, 1, 0, 0x0a, 12, &reply, &reply_len, 0); if (ret <= 0)