Hi,
I'd like to fix two bugs which cause problems of the order of the boot
entries. A diff which add EFI support will follow them.
ok?
Initialize boot_catalog_entry's entry_type properly. This had been
missing but the type was used in cd9660_setup_boot().
diff --git a/usr.sbin/makefs/cd9660/cd9660_eltorito.c
b/usr.sbin/makefs/cd9660/cd9660_eltorito.c
index 409298d5ca6..7de2bfc83f9 100644
--- a/usr.sbin/makefs/cd9660/cd9660_eltorito.c
+++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.c
@@ -221,6 +221,7 @@ cd9660_boot_setup_validation_entry(char sys)
size_t i;
entry = cd9660_init_boot_catalog_entry();
+ entry->entry_type = ET_ENTRY_VE;
ve = &entry->entry_data.VE;
ve->header_id[0] = 1;
@@ -255,6 +256,7 @@ cd9660_boot_setup_default_entry(struct cd9660_boot_image
*disk)
if (default_entry == NULL)
return NULL;
+ default_entry->entry_type = ET_ENTRY_IE;
ie = &default_entry->entry_data.IE;
ie->boot_indicator[0] = disk->bootable;
@@ -282,6 +284,7 @@ cd9660_boot_setup_section_head(char platform)
if (entry == NULL)
return NULL;
+ entry->entry_type = ET_ENTRY_SH;
sh = &entry->entry_data.SH;
/* More by default. The last one will manually be set to 0x91 */
sh->header_indicator[0] = ET_SECTION_HEADER_MORE;
@@ -298,6 +301,7 @@ cd9660_boot_setup_section_entry(struct cd9660_boot_image
*disk)
if ((entry = cd9660_init_boot_catalog_entry()) == NULL)
return NULL;
+ entry->entry_type = ET_ENTRY_SE;
se = &entry->entry_data.SE;
se->boot_indicator[0] = ET_BOOTABLE;