Avoiding to inquire NWA of unwritable media or states

This commit is contained in:
Thomas Schmitt 2010-03-27 15:58:05 +00:00
parent 3c8d21f75b
commit 0dd6444ea7
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2010.03.26.083158"
#define Cdrskin_timestamP "2010.03.27.155659"

View File

@ -425,6 +425,10 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
if (mmc_function_spy(d, "mmc_get_nwa") <= 0)
return -1;
/* ts B00327 : Avoid to inquire unsuitable media states */
if (d->status != BURN_DISC_BLANK && d->status != BURN_DISC_APPENDABLE)
return 0;
ret = mmc_read_track_info(d, trackno, &buf, alloc_len);
if (ret <= 0)
return ret;