summaryrefslogtreecommitdiff
path: root/usr.sbin/makefs
diff options
context:
space:
mode:
authorBenno Rice <benno@FreeBSD.org>2018-03-23 22:52:26 +0000
committerBenno Rice <benno@FreeBSD.org>2018-03-23 22:52:26 +0000
commitebf1c08960f171cb37c81e1d1e17b12cbddb4e4e (patch)
tree29368653d78a61e0b696fa269f3ee0236c4e7d5d /usr.sbin/makefs
parent709160861769de2783f061587afc81b4b737f834 (diff)
downloadsrc-test2-ebf1c08960f171cb37c81e1d1e17b12cbddb4e4e.tar.gz
src-test2-ebf1c08960f171cb37c81e1d1e17b12cbddb4e4e.zip
Notes
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r--usr.sbin/makefs/cd9660/cd9660_eltorito.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/makefs/cd9660/cd9660_eltorito.c b/usr.sbin/makefs/cd9660/cd9660_eltorito.c
index 303f51819e58..b0ed19eee4b3 100644
--- a/usr.sbin/makefs/cd9660/cd9660_eltorito.c
+++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.c
@@ -294,7 +294,10 @@ cd9660_boot_setup_section_head(char platform)
return NULL;
sh = &entry->entry_data.SH;
- /* More by default. The last one will manually be set to 0x91 */
+ /*
+ * More by default.
+ * The last one will manually be set to ET_SECTION_HEADER_LAST
+ */
sh->header_indicator[0] = ET_SECTION_HEADER_MORE;
sh->platform_id[0] = platform;
sh->num_section_entries[0] = 0;
@@ -464,6 +467,13 @@ cd9660_setup_boot(iso9660_disk *diskStructure, int first_sector)
tmp_disk = TAILQ_NEXT(tmp_disk, image_list);
}
+ /* Find the last Section Header entry and mark it as the last. */
+ LIST_FOREACH(next, &diskStructure->boot_entries, ll_struct) {
+ if (next->entry_type == ET_ENTRY_SH)
+ head = next;
+ }
+ head->entry_data.SH.header_indicator[0] = ET_SECTION_HEADER_LAST;
+
/* TODO: Remaining boot disks when implemented */
return first_sector + used_sectors;