Made Xorriso_write_session() ready for long block adresses

This commit is contained in:
Thomas Schmitt 2024-03-21 22:25:31 +01:00
parent d635037661
commit c8788712fc
4 changed files with 12 additions and 10 deletions

View File

@ -333,7 +333,8 @@ int Xorriso_option_print(struct XorrisO *xorriso, char *text, int flag)
*/
int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
{
int ret, fd;
int fd;
off_t ret;
xorriso->print_size_attempts++;
if(!Xorriso_change_is_pending(xorriso, 0)) {
@ -352,7 +353,7 @@ int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
return(0);
}
if(flag&1) {
sprintf(xorriso->result_line,"%d\n", ret);
sprintf(xorriso->result_line,"%.f\n", (double) ret);
if(xorriso->packet_output) {
Xorriso_result(xorriso,0);
} else {
@ -364,7 +365,7 @@ int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
fsync(fd);
}
} else {
sprintf(xorriso->result_line,"Image size : %ds\n", ret);
sprintf(xorriso->result_line,"Image size : %.fs\n", (double) ret);
Xorriso_result(xorriso,0);
}
return(1);

View File

@ -1178,9 +1178,10 @@ ex:;
@return <=0 error , 1= success
2= failure with DVD-RW, please call Xorriso_retry_write_session()
*/
int Xorriso_write_session(struct XorrisO *xorriso, int flag)
off_t Xorriso_write_session(struct XorrisO *xorriso, int flag)
{
int ret, i, pacifier_speed= 0, data_lba, is_bootable= 0;
int ret, i, pacifier_speed= 0, is_bootable= 0;
off_t data_lba;
int freshly_bootable= 0, hide_attr, signal_mode, role, is_bdr_pow= 0;
char *xorriso_id= NULL, *img_id, *sfe= NULL, *out_cs;
struct isoburn_imgen_opts *sopts= NULL;
@ -1476,9 +1477,9 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
goto cancel_iso;
isoburn_igopt_get_effective_lba(sopts, &(xorriso->session_lba));
if(xorriso->do_stream_recording == 2) {
ret= isoburn_igopt_get_data_start(sopts, &data_lba);
if(ret > 0 && data_lba >= 16)
burn_write_opts_set_stream_recording(burn_options, data_lba);
ret= isoburn_igopt_get_data_start_v2(sopts, &data_lba);
if(ret > 0 && data_lba >= 16 && data_lba < (int) 0x7fffffff)
burn_write_opts_set_stream_recording(burn_options, (int) data_lba);
}
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, flag&1);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2024.03.21.203354"
#define Xorriso_timestamP "2024.03.21.212514"

View File

@ -43,7 +43,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag);
int Xorriso_write_session(struct XorrisO *xorriso, int flag);
off_t Xorriso_write_session(struct XorrisO *xorriso, int flag);
int Xorriso_retry_write_session(struct XorrisO *xorriso, int flag);