svn commit: r331467 - head/usr.sbin/makefs/cd9660
Benno Rice
benno at FreeBSD.org
Fri Mar 23 22:52:27 UTC 2018
Author: benno
Date: Fri Mar 23 22:52:26 2018
New Revision: 331467
URL: https://svnweb.freebsd.org/changeset/base/331467
Log:
Correctly mark the last El Torito section header.
Reported by: Thomas Schmitt <scdbackup at gmx.net>
Reviewed by: emaste, imp
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D14812
Modified:
head/usr.sbin/makefs/cd9660/cd9660_eltorito.c
Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c
==============================================================================
--- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri Mar 23 22:36:24 2018 (r331466)
+++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri Mar 23 22:52:26 2018 (r331467)
@@ -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;
@@ -463,6 +466,13 @@ cd9660_setup_boot(iso9660_disk *diskStructure, int fir
LIST_INSERT_AFTER(head, temp, ll_struct);
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 */
More information about the svn-src-all
mailing list