Don't try to modify El Torito section headers if there aren't any.

MFC after:	1 week
This commit is contained in:
Benno Rice 2018-03-23 22:59:45 +00:00
parent ebf1c08960
commit 633cb765d8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331468

View File

@ -468,11 +468,14 @@ cd9660_setup_boot(iso9660_disk *diskStructure, int first_sector)
}
/* Find the last Section Header entry and mark it as the last. */
head = NULL;
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;
if (head != NULL)
head->entry_data.SH.header_indicator[0] =
ET_SECTION_HEADER_LAST;
/* TODO: Remaining boot disks when implemented */