From 3cfa65388d5b338ea832c74be7cd8d20e551e55d Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 20 Dec 2006 14:52:48 +0000 Subject: [PATCH] Avoid undefined 43h commands (TOC/ATIP) with non-CD --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/drive.c | 12 +++++++++--- libburn/trunk/libburn/mmc.c | 3 ++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index d443bfef..c695f2c9 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2006.12.20.142301" +#define Cdrskin_timestamP "2006.12.20.145222" diff --git a/libburn/trunk/libburn/drive.c b/libburn/trunk/libburn/drive.c index 8f1bd9a4..2cec1f95 100644 --- a/libburn/trunk/libburn/drive.c +++ b/libburn/trunk/libburn/drive.c @@ -191,7 +191,8 @@ int burn_drive_inquire_media(struct burn_drive *d) #endif /* ! Libburn_grab_release_and_grab_agaiN */ } else { - d->read_toc(d); + if (d->current_profile == -1 || d->current_is_cd_profile) + d->read_toc(d); } d->busy = BURN_DRIVE_IDLE; return 1; @@ -1232,8 +1233,13 @@ int burn_disc_read_atip(struct burn_drive *d) 0, 0); return -1; } - d->read_atip(d); - /* >>> some control of success would be nice :) */ + if (d->current_profile == -1 || d->current_is_cd_profile) { + d->read_atip(d); + /* >>> some control of success would be nice :) */ + } else { + /* mmc5r03c.pdf 6.26.3.6.3 : ATIP is undefined for non-CD */; + return 0; + } return 1; } diff --git a/libburn/trunk/libburn/mmc.c b/libburn/trunk/libburn/mmc.c index 0228b555..de89faa1 100644 --- a/libburn/trunk/libburn/mmc.c +++ b/libburn/trunk/libburn/mmc.c @@ -553,7 +553,8 @@ void mmc_read_disc_info(struct burn_drive *d) case 1: d->status = BURN_DISC_APPENDABLE; case 2: - mmc_read_toc(d); + if (d->current_profile == -1 || d->current_is_cd_profile) + mmc_read_toc(d); break; }