Correction with erasable bit of burn_disc_get_cd_info()

This commit is contained in:
Thomas Schmitt 2009-09-09 13:39:27 +00:00
parent a8ba16ad63
commit 3dbc958c05
5 changed files with 8 additions and 6 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2009.09.09.125305"
#define Cdrskin_timestamP "2009.09.09.134030"

View File

@ -2653,7 +2653,7 @@ int burn_disc_get_media_id(struct burn_drive *d,
bit2= bar_code valid
bit3= disc_app_code valid
bit4= Disc is unrestricted (URU bit)
bit31= Disc is nominally erasable (Erasable bit)
bit5= Disc is nominally erasable (Erasable bit)
This will be set with overwriteable media which
libburn normally considers to be unerasable blank.
*/
@ -2674,6 +2674,6 @@ int burn_disc_get_cd_info(struct burn_drive *d, char disc_type[80],
memcpy(bar_code, d->disc_bar_code, 8);
bar_code[9]= 0;
*app_code = d->disc_app_code;
*valid = d->disc_info_valid | ((!!d->erasable) << 31);
*valid = d->disc_info_valid;
return 1;
}

View File

@ -1181,7 +1181,7 @@ char *burn_guess_cd_manufacturer(int m_li, int s_li, int f_li,
bit4= Disc is unrestricted (URU bit, 51h READ DISC INFO)
This seems to be broken with my drives. The bit is
0 and the validity bit for disc_app_code is 0 too.
bit31= Disc is nominally erasable (Erasable bit)
bit5= Disc is nominally erasable (Erasable bit)
This will be set with overwriteable media which
libburn normally considers to be unerasable blank.
@since 0.7.2

View File

@ -1628,9 +1628,10 @@ static int mmc_read_disc_info_al(struct burn_drive *d, int *alloc_len)
d->disc_app_code = data[32];
d->disc_info_valid |= 8;
}
if (data[7] & 32) {
if (data[7] & 32)
d->disc_info_valid |= 16;
}
if (data[2] & 16)
d->disc_info_valid |= 32;
disc_status = data[2] & 3;
d->state_of_last_session = (data[2] >> 2) & 3;

View File

@ -226,6 +226,7 @@ struct burn_drive
int disc_info_valid; /* bit0= disc_type , bit1= disc_id ,
bit2= disc_bar_code , bit3= disc_app_code
bit4= URU bit is set (= unrestricted use)
bit5= Erasable bit was set in reply
*/
/* ts A70108 from 23h READ FORMAT CAPACITY mmc5r03c.pdf 6.24 */