Made Xorriso_tell_media_space() ready for long block adresses

This commit is contained in:
Thomas Schmitt 2024-03-20 12:45:09 +01:00
parent c64e48d588
commit 435521a2c9
5 changed files with 15 additions and 11 deletions

View File

@ -2315,9 +2315,10 @@ int Xorriso_get_profile(struct XorrisO *xorriso, int *profile_number,
bit1= obtain info from outdev
bit2= no need to obtain msc2 (NWA)
*/
int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag)
int Xorriso_msinfo(struct XorrisO *xorriso, off_t *msc1, off_t *msc2, int flag)
{
int ret, dummy, is_bdr_pow= 0;
int ret, is_bdr_pow= 0;
off_t dummy;
struct burn_drive *drive;
struct burn_drive_info *dinfo;
enum burn_disc_status disc_state;
@ -2352,7 +2353,7 @@ int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag)
}
return(0);
}
ret= isoburn_disc_get_msc1(drive, msc1);
ret= isoburn_disc_get_msc1_v2(drive, msc1);
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, "Cannot obtain address of most recent session");
@ -2361,7 +2362,7 @@ int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag)
}
if(flag & 4)
return(1);
ret= isoburn_disc_track_lba_nwa(drive, NULL, 0, &dummy, msc2);
ret= isoburn_disc_track_lba_nwa_v2(drive, NULL, 0, &dummy, msc2);
if(ret<0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, "Cannot obtain next writeable address on media");

View File

@ -121,7 +121,8 @@ int Xorriso_cdrskin_help(struct XorrisO *xorriso, int flag)
int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv,
int flag)
{
int ret, i, k, mem_do_close, aq_ret, eject_ret, msc1, msc2, hflag;
int ret, i, k, mem_do_close, aq_ret, eject_ret, hflag;
off_t msc1, msc2;
int do_atip= 0, do_checkdrive= 0, do_eject= 0, do_scanbus= 0;
int do_toc= 0, do_verbous= 0, do_version= 0, do_help= 0, do_waiti= 0;
int do_multi= 0, do_msinfo= 0, do_grow= 0, do_isosize= 0, do_xa1= 0;
@ -525,7 +526,7 @@ no_volunteer:;
ret= Xorriso_msinfo(xorriso, &msc1, &msc2, 2 | !!do_grow);
if(ret<=0)
goto ex;
sprintf(xorriso->result_line, "%d,%d\n", msc1, msc2);
sprintf(xorriso->result_line, "%.f,%.f\n", (double) msc1, (double) msc2);
Xorriso_result(xorriso, 1);
}

View File

@ -266,7 +266,8 @@ static int Xorriso_report_pvd_time(struct XorrisO *xorriso, char *head,
int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
{
int ret, msc1= -1, msc2, i;
int ret;
off_t msc1= -1, msc2, i;
IsoImage *image;
struct burn_drive_info *dinfo;
struct burn_drive *drive;
@ -285,7 +286,7 @@ int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
Xorriso_toc(xorriso, 128);
if(msc1 >= 0) {
for(i = msc1 + 16; i < msc1 + 32; i++) {
ret= burn_read_data(drive, (off_t) i * (off_t) 2048, block_head,
ret= burn_read_data(drive, i * (off_t) 2048, block_head,
(off_t) sizeof(block_head), &head_count, 2);
if(ret <= 0) {
i= msc1 + 32;
@ -295,7 +296,7 @@ int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
break;
}
if(i < msc1 + 32) {
sprintf(msg, "PVD address : %ds\n", i);
sprintf(msg, "PVD address : %.fs\n", (double) i);
Xorriso_result(xorriso,0);
}
}

View File

@ -1 +1 @@
#define Xorriso_timestamP "2024.03.19.205356"
#define Xorriso_timestamP "2024.03.20.114449"

View File

@ -328,7 +328,8 @@ int Xorriso_libburn_adr(struct XorrisO *xorriso, char *address_string,
/* @param flag bit1= obtain info from outdev
*/
int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag);
int Xorriso_msinfo(struct XorrisO *xorriso, off_t *msc1, off_t *msc2,
int flag);
/*
@param flag bit0= obtain iso_lba from indev