Record size 0 with oversized EFI boot images to span them up to end of medium

This commit is contained in:
Thomas Schmitt 2015-10-23 08:57:01 +00:00
parent fdf10cadc1
commit d87990de2c
2 changed files with 10 additions and 3 deletions

View File

@ -729,9 +729,16 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
el_torito_set_boot_platform_id(bootimg, (uint8_t) platform_id); el_torito_set_boot_platform_id(bootimg, (uint8_t) platform_id);
if(load_size / 512 > 65535) { if(load_size / 512 > 65535) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"Boot image load size exceeds 65535 blocks. Will record 65535 in El Torito."); "Boot image load size exceeds 65535 blocks of 512 bytes. ");
if(platform_id == 0xef) {
strcat(xorriso->info_text,
"Will record 0 in El Torito to extend ESP to end-of-medium.");
load_size= 0;
} else {
strcat(xorriso->info_text, "Will record 65535 in El Torito.");
load_size= 65535 * 512;
}
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
load_size= 65535 * 512;
} }
/* The function will understand negative short as positive unsigned */ /* The function will understand negative short as positive unsigned */
el_torito_set_load_size(bootimg, (short) (load_size / 512)); el_torito_set_load_size(bootimg, (short) (load_size / 512));

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.10.18.130151" #define Xorriso_timestamP "2015.10.23.085903"