New API call burn_disc_track_lba_nwa_v2()

This commit is contained in:
Thomas Schmitt 2024-03-02 14:12:22 +01:00
parent d48bbb4b66
commit 29bfd7e5e7
5 changed files with 43 additions and 8 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2024.03.01.185046"
#define Cdrskin_timestamP "2024.03.02.131145"

View File

@ -2693,10 +2693,10 @@ int burn_disc_read_atip(struct burn_drive *d)
}
/* ts A61110 : new API function */
int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
int trackno, int *lba, int *nwa)
int burn_disc_track_lba_nwa_v2(struct burn_drive *d, struct burn_write_opts *o,
int trackno, off_t *lba, off_t *nwa)
{
int ret;
int ret, int_lba, int_nwa;
if (burn_drive_is_released(d)) {
libdax_msgs_submit(libdax_messenger,
@ -2724,11 +2724,38 @@ int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
return 0;
if (o != NULL)
d->send_write_parameters(d, NULL, -1, o);
ret = d->get_nwa(d, trackno, lba, nwa);
ret = d->get_nwa(d, trackno, &int_lba, &int_nwa);
if (ret <= 0)
return ret;
*lba = int_lba;
*nwa = int_nwa;
return ret;
}
/* ts A61110 / C40302 : API */
int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
int trackno, int *lba, int *nwa)
{
int ret;
off_t off_lba, off_nwa;
ret = burn_disc_track_lba_nwa_v2(d, o, trackno, &off_lba, &off_nwa);
if (ret <= 0)
return ret;
if (off_lba > 0x7fffffff)
*lba = 0x7fffffff;
else
*lba = off_lba;
if (off_nwa > 0x7fffffff) {
*nwa = 0x7fffffff;
return 0;
} else {
*nwa = off_nwa;
}
return 1;
}
/* ts A70131 : new API function */
int burn_disc_get_msc1(struct burn_drive *d, int *start)
{

View File

@ -763,7 +763,7 @@ struct burn_progress_v2 {
off_t buffered_bytes;
/** The minimum number of bytes stored in buffer during write.
(Caution: Before surely one buffer size of bytes was processed,
this value is 0xffffffffffffffff.)
this value is 0x7fffffffffffffff.)
*/
off_t buffer_min_fill;
};
@ -1542,6 +1542,13 @@ int burn_disc_get_phys_format_info(struct burn_drive *d, int *disk_category,
int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
int trackno, int *lba, int *nwa);
/* ts C40302 */
/** Like burn_disc_track_lba_nwa(), but with off_t results.
@since 1.5.8
*/
int burn_disc_track_lba_nwa_v2(struct burn_drive *d, struct burn_write_opts *o,
int trackno, off_t *lba, off_t *nwa);
/* ts B10525 */
/** Tells whether a previous attempt to determine the Next Writeable Address
of the upcoming track reveiled that the READ TRACK INFORMATION Damage Bit

View File

@ -216,5 +216,6 @@ local: *;
LIBBURN4_1.5.8 {
burn_drive_get_status_v2;
burn_disc_track_lba_nwa_v2;
} LIBBURN4;

View File

@ -384,8 +384,8 @@ struct burn_drive
*/
int mr_capacity_trusted;
/* ts B10314 : Next Writeable Address for drive_role == 5 */
int role_5_nwa;
/* ts B10314 / C40302 : Next Writeable Address for drive_role == 5 */
off_t role_5_nwa;
/* ts B60730 */
int do_no_immed;