diff --git a/libisoburn/burn_wrap.c b/libisoburn/burn_wrap.c index 24757574..6d717bb6 100644 --- a/libisoburn/burn_wrap.c +++ b/libisoburn/burn_wrap.c @@ -796,9 +796,9 @@ off_t isoburn_disc_available_space(struct burn_drive *d, } -int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba) +int isoburn_disc_get_msc1_v2(struct burn_drive *d, off_t *start_lba) { - int ret; + int ret, int_lba; struct isoburn *o; #ifdef Hardcoded_cd_rW @@ -824,13 +824,35 @@ int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba) *start_lba= 0; return(1); } - return(burn_disc_get_msc1(d, start_lba)); + ret= burn_disc_get_msc1(d, &int_lba); + if(ret <= 0) + return(ret); + *start_lba= int_lba; + return(ret); } -int isoburn_disc_track_lba_nwa(struct burn_drive *d, - struct burn_write_opts *opts, - int trackno, int *lba, int *nwa) +int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba) +{ + int ret; + off_t long_lba; + + ret= isoburn_disc_get_msc1_v2(d, &long_lba); + if(ret <= 0) + return(ret); + if(long_lba > 0x7fffffff) { + *start_lba= 0x7fffffff; + ret= 0; + } else { + *start_lba= long_lba; + } + return(ret); +} + + +int isoburn_disc_track_lba_nwa_v2(struct burn_drive *d, + struct burn_write_opts *opts, + int trackno, off_t *lba, off_t *nwa) { int ret; struct isoburn *o; @@ -858,7 +880,32 @@ int isoburn_disc_track_lba_nwa(struct burn_drive *d, s= isoburn_disc_get_status(d); if(s == BURN_DISC_BLANK) /* We do not believe in anything but nwa = lba = 0 */ return(1); - return(burn_disc_track_lba_nwa(d, opts, trackno, lba, nwa)); + return(burn_disc_track_lba_nwa_v2(d, opts, trackno, lba, nwa)); +} + + +int isoburn_disc_track_lba_nwa(struct burn_drive *d, + struct burn_write_opts *opts, + int trackno, int *lba, int *nwa) +{ + int ret; + off_t long_lba, long_nwa; + + ret= isoburn_disc_track_lba_nwa_v2(d, opts, trackno, &long_lba, &long_nwa); + if(ret <= 0) + return(ret); + if(long_lba > 0x7fffffff) { + *lba= 0x7fffffff; + } else { + *lba= long_lba; + } + if(long_nwa > 0x7fffffff) { + *nwa= 0x7fffffff; + ret= 0; + } else { + *nwa= long_nwa; + } + return(ret); } diff --git a/libisoburn/isofs_wrap.c b/libisoburn/isofs_wrap.c index 02f01884..c1c172aa 100644 --- a/libisoburn/isofs_wrap.c +++ b/libisoburn/isofs_wrap.c @@ -594,7 +594,7 @@ int isoburn_attach_image(struct burn_drive *d, IsoImage *image) /* API */ -int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag) +int isoburn_attach_start_lba_v2(struct burn_drive *d, off_t lba, int flag) { int ret; struct isoburn *o; @@ -611,6 +611,14 @@ int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag) } +int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag) +{ + int ret; + + ret= isoburn_attach_start_lba_v2(d, (off_t) lba, flag); + return(ret); +} + /* API function. See libisoburn.h */ int isoburn_activate_session(struct burn_drive *drive) diff --git a/libisoburn/libisoburn.h b/libisoburn/libisoburn.h index 06f8bdff..18f74ae2 100644 --- a/libisoburn/libisoburn.h +++ b/libisoburn/libisoburn.h @@ -2592,6 +2592,11 @@ int isoburn_attach_image(struct burn_drive *d, IsoImage *image); */ int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag); +/** Like isoburn_attach_start_lba(), but with off_t result value. + @since 1.5.8 +*/ +int isoburn_attach_start_lba_v2(struct burn_drive *d, off_t lba, int flag); + /** Return the best possible estimation of the currently available capacity of the medium. This might depend on particular write option settings and on @@ -2625,6 +2630,11 @@ off_t isoburn_disc_available_space(struct burn_drive *d, */ int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba); +/** Like isoburn_disc_get_msc1(), but with off_t result value. + @since 1.5.8 +*/ +int isoburn_disc_get_msc1_v2(struct burn_drive *d, off_t *start_lba); + /** Use this with trackno==0 to obtain the predicted start block number of the new session. The interesting number is returned in parameter nwa. @@ -2640,6 +2650,13 @@ int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba); int isoburn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o, int trackno, int *lba, int *nwa); +/** Like isoburn_disc_track_lba_nwa(), but with off_t result value. + @since 1.5.8 +*/ +int isoburn_disc_track_lba_nwa_v2(struct burn_drive *d, + struct burn_write_opts *o, + int trackno, off_t *lba, off_t *nwa); + /** Obtain the size which was attributed to an emulated appendable on actually overwritable media. This value is supposed to be <= 2048 * nwa as of diff --git a/libisoburn/libisoburn.ver b/libisoburn/libisoburn.ver index 2ca21ea6..e45e44fd 100644 --- a/libisoburn/libisoburn.ver +++ b/libisoburn/libisoburn.ver @@ -364,6 +364,9 @@ local: *; }; LIBISOBURN1_1.5.8 { +isoburn_attach_start_lba_v2; +isoburn_disc_get_msc1_v2; +isoburn_disc_track_lba_nwa_v2; isoburn_get_attached_start_lba_v2; isoburn_get_mount_params_v2; isoburn_igopt_get_data_start_v2; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 6bc8a394..d882fc0a 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2024.03.09.212055" +#define Xorriso_timestamP "2024.03.09.223619"