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 Correctly mark the last El Torito sec...



details:   https://anonhg.NetBSD.org/src/rev/0ccde89b12b8
branches:  trunk
changeset: 831381:0ccde89b12b8
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Wed Mar 28 06:48:55 2018 +0000

description:
Correctly mark the last El Torito section header.

Pointed out by Benno Rice via DM.

diffstat:

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

diffs (31 lines):

diff -r 3d3e3b04e4b8 -r 0ccde89b12b8 usr.sbin/makefs/cd9660/cd9660_eltorito.c
--- a/usr.sbin/makefs/cd9660/cd9660_eltorito.c  Tue Mar 27 23:39:23 2018 +0000
+++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.c  Wed Mar 28 06:48:55 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd9660_eltorito.c,v 1.22 2017/11/09 01:28:05 nonaka Exp $      */
+/*     $NetBSD: cd9660_eltorito.c,v 1.23 2018/03/28 06:48:55 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.22 2017/11/09 01:28:05 nonaka Exp $");
+__RCSID("$NetBSD: cd9660_eltorito.c,v 1.23 2018/03/28 06:48:55 nonaka Exp $");
 #endif  /* !__lint */
 
 #ifdef DEBUG
@@ -497,6 +497,12 @@
                LIST_INSERT_AFTER(head, temp, ll_struct);
        }
 
+       /* 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;
+       }
        if (head != NULL)
                head->entry_data.SH.header_indicator[0] = ET_SECTION_HEADER_LAST;
 



Home | Main Index | Thread Index | Old Index