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 0e777ec688
commit 6e17c59f6b
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) if (mmc_function_spy(d, "mmc_get_nwa") <= 0)
return -1; 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); ret = mmc_read_track_info(d, trackno, &buf, alloc_len);
if (ret <= 0) if (ret <= 0)
return ret; return ret;