Made struct XorrisO ready for long block adresses

This commit is contained in:
2024-03-24 09:32:01 +01:00
parent 5de4a8dd45
commit c74f175972
5 changed files with 27 additions and 31 deletions

View File

@ -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");