Made struct XorrisO ready for long block adresses
This commit is contained in:
parent
5de4a8dd45
commit
c74f175972
@ -125,7 +125,6 @@ int Xorriso_create_empty_iso(struct XorrisO *xorriso, int flag)
|
||||
int Xorriso_record_boot_info(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
int ret;
|
||||
off_t start_lba;
|
||||
struct burn_drive_info *dinfo;
|
||||
struct burn_drive *drive;
|
||||
IsoImage *image;
|
||||
@ -147,13 +146,10 @@ int Xorriso_record_boot_info(struct XorrisO *xorriso, int flag)
|
||||
iso_image_unref(image); /* release obtained reference */
|
||||
if(ret != 1)
|
||||
return(0);
|
||||
if(bootimg_node != NULL) {
|
||||
Xorriso__file_start_lba((IsoNode *) bootimg_node, &start_lba, 0);
|
||||
if(start_lba <= (off_t) 0x7fffffff)
|
||||
xorriso->loaded_boot_bin_lba= start_lba;
|
||||
else
|
||||
xorriso->loaded_boot_bin_lba= 0;
|
||||
}
|
||||
if(bootimg_node != NULL)
|
||||
Xorriso__file_start_lba((IsoNode *) bootimg_node,
|
||||
&(xorriso->loaded_boot_bin_lba), 0);
|
||||
|
||||
if(bootcat_node != NULL)
|
||||
Xorriso_path_from_lba(xorriso, (IsoNode *) bootcat_node, (off_t) 0,
|
||||
xorriso->loaded_boot_cat_path, 0);
|
||||
@ -938,8 +934,8 @@ no_boot:;
|
||||
} else if(xorriso->loaded_boot_bin_lba <= 0) {
|
||||
sprintf(respt, "Boot image : -not-found-at-load-time-");
|
||||
} else {
|
||||
sprintf(respt, "Boot image : -not-found-any-more-by-lba=%d",
|
||||
xorriso->loaded_boot_bin_lba);
|
||||
sprintf(respt, "Boot image : -not-found-any-more-by-lba=%.f",
|
||||
(double) xorriso->loaded_boot_bin_lba);
|
||||
}
|
||||
Xorriso__append_boot_params(respt, bootimg, 0);
|
||||
strcat(respt, "\n");
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
|
||||
|
||||
Copyright 2007-2021 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
|
||||
@ -2666,9 +2666,9 @@ int Xorriso_write_session_log(struct XorrisO *xorriso, int flag)
|
||||
*(wpt++)= *rpt;
|
||||
}
|
||||
*wpt= 0;
|
||||
fprintf(fp, "%s %d %d %s\n",
|
||||
Ftimetxt(time(0), timetext, 2), xorriso->session_lba,
|
||||
xorriso->session_blocks, sfe);
|
||||
fprintf(fp, "%s %.f %.f %s\n",
|
||||
Ftimetxt(time(0), timetext, 2), (double) xorriso->session_lba,
|
||||
(double) xorriso->session_blocks, sfe);
|
||||
fclose(fp);
|
||||
ret= 1;
|
||||
ex:;
|
||||
@ -3706,7 +3706,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
|
||||
is_default= (xorriso->grow_blindly_msc2<0);
|
||||
sprintf(sfe, "%d", xorriso->grow_blindly_msc2);
|
||||
sprintf(sfe, "%.f", (double) xorriso->grow_blindly_msc2);
|
||||
sprintf(line,"-grow_blindly %s\n",
|
||||
xorriso->grow_blindly_msc2 < 0 ? "off" : sfe);
|
||||
if(!(is_default && no_defaults))
|
||||
|
@ -1450,8 +1450,8 @@ off_t Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
Xorriso_set_abort_severity(xorriso, 1);
|
||||
if (xorriso->grow_blindly_msc2 >= 0 &&
|
||||
xorriso->out_drive_handle != xorriso->in_drive_handle) {
|
||||
ret= isoburn_prepare_blind_grow(source_drive, &disc, sopts, drive,
|
||||
xorriso->grow_blindly_msc2);
|
||||
ret= isoburn_prepare_blind_grow_v2(source_drive, &disc, sopts, drive,
|
||||
xorriso->grow_blindly_msc2);
|
||||
if(ret>0) {
|
||||
/* Allow the consumer of output to access the input drive */
|
||||
source_drive= NULL;
|
||||
@ -1475,7 +1475,7 @@ off_t Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
ret= Xorriso_make_write_options(xorriso, drive, &burn_options, 0);
|
||||
if(ret<=0)
|
||||
goto cancel_iso;
|
||||
isoburn_igopt_get_effective_lba(sopts, &(xorriso->session_lba));
|
||||
isoburn_igopt_get_effective_lba_v2(sopts, &(xorriso->session_lba));
|
||||
if(xorriso->do_stream_recording == 2) {
|
||||
ret= isoburn_igopt_get_data_start_v2(sopts, &data_lba);
|
||||
if(ret > 0 && data_lba >= 16 && data_lba < (int) 0x7fffffff)
|
||||
@ -1547,11 +1547,11 @@ off_t Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
tracks= burn_session_get_tracks(sessions[0], &num_tracks);
|
||||
if(tracks!=NULL && num_tracks>0) {
|
||||
burn_track_get_counters(tracks[0],&readcounter,&writecounter);
|
||||
xorriso->session_blocks= (int) (writecounter/ (off_t) 2048);
|
||||
xorriso->session_blocks= writecounter / 2048.0;
|
||||
sprintf(xorriso->info_text,
|
||||
"ISO image produced: %d sectors\nWritten to medium : %d sectors at LBA %d\n",
|
||||
(int) (readcounter/ (off_t) 2048),
|
||||
xorriso->session_blocks, xorriso->session_lba);
|
||||
"ISO image produced: %.f sectors\nWritten to medium : %.f sectors at LBA %.f\n",
|
||||
((double) readcounter) / 2048.0,
|
||||
(double) xorriso->session_blocks, (double) xorriso->session_lba);
|
||||
Xorriso_info(xorriso, 0);
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
/* Command line oriented batch and dialog tool which creates, loads,
|
||||
manipulates and burns ISO 9660 filesystem images.
|
||||
|
||||
Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
|
||||
@ -270,8 +270,8 @@ struct XorrisO { /* the global context of xorriso */
|
||||
char application_use[SfileadrL];
|
||||
|
||||
char session_logfile[SfileadrL];
|
||||
int session_lba;
|
||||
int session_blocks;
|
||||
off_t session_lba;
|
||||
off_t session_blocks;
|
||||
|
||||
/* >>> put libburn/isoburn aspects here */
|
||||
|
||||
@ -380,10 +380,10 @@ struct XorrisO { /* the global context of xorriso */
|
||||
char outdev_off_adr[SfileadrL]; /* Result of burn_drive_convert_fs_adr(outdev)
|
||||
when outdev gets acquired. */
|
||||
|
||||
int grow_blindly_msc2; /* if >= 0 this causes growing from drive to drive.
|
||||
The value is used as block address offset for
|
||||
image generation. Like in: mkisofs -C msc1,msc2
|
||||
*/
|
||||
off_t grow_blindly_msc2; /* if >= 0 this causes growing from drive to drive.
|
||||
The value is used as block address offset for
|
||||
image generation. Like in: mkisofs -C msc1,msc2
|
||||
*/
|
||||
|
||||
int ban_stdio_write;
|
||||
int do_dummy;
|
||||
@ -622,7 +622,7 @@ struct XorrisO { /* the global context of xorriso */
|
||||
*/
|
||||
|
||||
/* LBA of boot image after image loading */
|
||||
int loaded_boot_bin_lba;
|
||||
off_t loaded_boot_bin_lba;
|
||||
/* Path of the catalog node after image loading */
|
||||
char loaded_boot_cat_path[SfileadrL];
|
||||
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2024.03.23.212004"
|
||||
#define Xorriso_timestamP "2024.03.24.081207"
|
||||
|
Loading…
Reference in New Issue
Block a user