Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/stand/efiboot efiboot: boot device is always e...



details:   https://anonhg.NetBSD.org/src/rev/3b003e6e694c
branches:  trunk
changeset: 321524:3b003e6e694c
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Tue Mar 20 10:19:33 2018 +0000

description:
efiboot: boot device is always efi_distlist first element.

diffstat:

 sys/arch/i386/stand/efiboot/efidisk.c |  15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diffs (29 lines):

diff -r 21bd35006814 -r 3b003e6e694c sys/arch/i386/stand/efiboot/efidisk.c
--- a/sys/arch/i386/stand/efiboot/efidisk.c     Tue Mar 20 10:18:10 2018 +0000
+++ b/sys/arch/i386/stand/efiboot/efidisk.c     Tue Mar 20 10:19:33 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efidisk.c,v 1.2 2018/03/08 10:34:33 nonaka Exp $       */
+/*     $NetBSD: efidisk.c,v 1.3 2018/03/20 10:19:33 nonaka Exp $       */
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -106,14 +106,11 @@
        FreePool(handles);
 
        if (efi_bootdp_type == BIOSDISK_TYPE_CD) {
-               TAILQ_FOREACH(edi, &efi_disklist, list) {
-                       if (edi->bootdev) {
-                               edi = TAILQ_FIRST(&efi_disklist);
-                               edi->type = BIOSDISK_TYPE_CD;
-                               TAILQ_REMOVE(&efi_disklist, edi, list);
-                               TAILQ_INSERT_TAIL(&efi_disklist, edi, list);
-                               break;
-                       }
+               edi = TAILQ_FIRST(&efi_disklist);
+               if (edi != NULL && edi->bootdev) {
+                       edi->type = BIOSDISK_TYPE_CD;
+                       TAILQ_REMOVE(&efi_disklist, edi, list);
+                       TAILQ_INSERT_TAIL(&efi_disklist, edi, list);
                }
        }
 



Home | Main Index | Thread Index | Old Index