Hi,

I'd like to add a platform-id for EFI boot.

ok?

diff --git a/usr.sbin/makefs/cd9660/cd9660_eltorito.c 
b/usr.sbin/makefs/cd9660/cd9660_eltorito.c
index 46ec432bc84..376c42f5dc3 100644
--- a/usr.sbin/makefs/cd9660/cd9660_eltorito.c
+++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.c
@@ -104,6 +104,8 @@ cd9660_add_boot_disk(iso9660_disk *diskStructure, const 
char *boot_info)
                new_image->system = ET_SYS_PPC;
        else if (strcmp(sysname, "macppc") == 0)
                new_image->system = ET_SYS_MAC;
+       else if (strcmp(sysname, "efi") == 0)
+               new_image->system = ET_SYS_EFI;
        else {
                warnx("boot disk system must be "
                      "i386, macppc, or powerpc");
@@ -335,12 +337,12 @@ cd9660_setup_boot(iso9660_disk *diskStructure, int 
first_sector)
        int used_sectors;
        int num_entries = 0;
        int catalog_sectors;
-       struct boot_catalog_entry *x86_head, *mac_head, *ppc_head,
+       struct boot_catalog_entry *x86_head, *mac_head, *ppc_head, *efi_head,
                *valid_entry, *default_entry, *temp, *head, **headp, *next;
        struct cd9660_boot_image *tmp_disk;
 
        headp = NULL;
-       x86_head = mac_head = ppc_head = NULL;
+       x86_head = mac_head = ppc_head = efi_head = NULL;
 
        /* If there are no boot disks, don't bother building boot information */
        if (TAILQ_EMPTY(&diskStructure->boot_images))
@@ -413,6 +415,9 @@ cd9660_setup_boot(iso9660_disk *diskStructure, int 
first_sector)
                case ET_SYS_MAC:
                        headp = &mac_head;
                        break;
+               case ET_SYS_EFI:
+                       headp = &efi_head;
+                       break;
                default:
                        warnx("%s: internal error: unknown system type",
                            __func__);
diff --git a/usr.sbin/makefs/cd9660/cd9660_eltorito.h 
b/usr.sbin/makefs/cd9660/cd9660_eltorito.h
index 43483018ef3..f527bc56b46 100644
--- a/usr.sbin/makefs/cd9660/cd9660_eltorito.h
+++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.h
@@ -41,6 +41,7 @@
 #define        ET_SYS_X86      0
 #define        ET_SYS_PPC      1
 #define        ET_SYS_MAC      2
+#define        ET_SYS_EFI      0xfe
 
 #define ET_BOOT_ENTRY_SIZE 0x20
 

Reply via email to