diff --git a/libisofs/fs_image.c b/libisofs/fs_image.c index c6b3a4c..7b511dd 100644 --- a/libisofs/fs_image.c +++ b/libisofs/fs_image.c @@ -5885,6 +5885,7 @@ int iso_image_import(IsoImage *image, IsoDataSource *src, memcpy(boot_image->id_string, data->id_strings[idx], 28); memcpy(boot_image->selection_crit, data->selection_crits, 20); boot_image->appended_idx = -1; + boot_image->appended_start = data->bootblocks[idx]; catalog->bootimages[catalog->num_bootimages] = boot_image; boot_image = NULL; @@ -5956,10 +5957,21 @@ int iso_image_import(IsoImage *image, IsoDataSource *src, /* warn about hidden images */ - iso_msg_submit(image->id, ISO_EL_TORITO_HIDDEN, 0, + if (image->bootcat->bootimages[idx]->platform_id == 0xef) { + iso_msg_submit(image->id, ISO_ELTO_EFI_HIDDEN, 0, + "Found hidden El-Torito image for EFI."); + iso_msg_submit(image->id, ISO_GENERAL_NOTE, 0, + "EFI image start and size: %lu * 2048 , %lu * 512", + (unsigned long int) + image->bootcat->bootimages[idx]->appended_start, + (unsigned long int) + image->bootcat->bootimages[idx]->load_size); + } else { + iso_msg_submit(image->id, ISO_EL_TORITO_HIDDEN, 0, "Found hidden El-Torito image. Its size could not " "be figured out, so image modify or boot image " "patching may lead to bad results."); + } } if (image->bootcat->node == NULL) { IsoNode *node; diff --git a/libisofs/libisofs.h b/libisofs/libisofs.h index ff766c8..441a55d 100644 --- a/libisofs/libisofs.h +++ b/libisofs/libisofs.h @@ -8955,6 +8955,9 @@ int iso_conv_name_chars(IsoWriteOpts *opts, char *name, size_t name_len, (FAILURE, HIGH, -420) */ #define ISO_MULTI_OVER_IMPORTED 0xE830FE5C +/** El-Torito EFI image is hidden (NOTE,HIGH, -421) */ +#define ISO_ELTO_EFI_HIDDEN 0xB030FE5B + /* Internal developer note: Place new error codes directly above this comment. diff --git a/libisofs/messages.c b/libisofs/messages.c index a498a59..9a4fd18 100644 --- a/libisofs/messages.c +++ b/libisofs/messages.c @@ -553,6 +553,8 @@ const char *iso_error_to_msg(int errcode) return "Zero sized, oversized, or mislocated SUSP CE area found"; case ISO_MULTI_OVER_IMPORTED: return "Multi-session would overwrite imported_iso interval"; + case ISO_ELTO_EFI_HIDDEN: + return "El-Torito EFI image is hidden"; default: return "Unknown error"; }