Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makefs/cd9660 Initialize boot_catalog_entry's entry...



details:   https://anonhg.NetBSD.org/src/rev/5a481fd7d793
branches:  trunk
changeset: 357388:5a481fd7d793
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Thu Nov 09 01:28:05 2017 +0000

description:
Initialize boot_catalog_entry's entry_type properly.

This had been missing but the type was used in cd9660_setup_boot().

>From OpenBSD usr.sbin/makefs/cd9660/cd9660_eltorito.c r1.10.

diffstat:

 usr.sbin/makefs/cd9660/cd9660_eltorito.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (50 lines):

diff -r d374a37c4346 -r 5a481fd7d793 usr.sbin/makefs/cd9660/cd9660_eltorito.c
--- a/usr.sbin/makefs/cd9660/cd9660_eltorito.c  Thu Nov 09 01:02:55 2017 +0000
+++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.c  Thu Nov 09 01:28:05 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd9660_eltorito.c,v 1.21 2017/01/24 11:22:43 nonaka Exp $      */
+/*     $NetBSD: cd9660_eltorito.c,v 1.22 2017/11/09 01:28:05 nonaka Exp $      */
 
 /*
  * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: cd9660_eltorito.c,v 1.21 2017/01/24 11:22:43 nonaka Exp $");
+__RCSID("$NetBSD: cd9660_eltorito.c,v 1.22 2017/11/09 01:28:05 nonaka Exp $");
 #endif  /* !__lint */
 
 #ifdef DEBUG
@@ -247,6 +247,7 @@
        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;
@@ -281,6 +282,7 @@
        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;
@@ -308,6 +310,7 @@
        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;
@@ -324,6 +327,7 @@
        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;



Home | Main Index | Thread Index | Old Index