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: Don't panic when BLOCK_...



details:   https://anonhg.NetBSD.org/src/rev/85bddeba781b
branches:  trunk
changeset: 450534:85bddeba781b
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Wed Apr 17 06:50:34 2019 +0000

description:
efiboot: Don't panic when BLOCK_IO_PROTOCOL is not found.

It has been reported that there is a machine where BLOCK_IO_PROTOCOL
can not be found when network boot without disk.

diffstat:

 sys/arch/i386/stand/efiboot/efidisk.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 266506f1a416 -r 85bddeba781b sys/arch/i386/stand/efiboot/efidisk.c
--- a/sys/arch/i386/stand/efiboot/efidisk.c     Wed Apr 17 02:29:43 2019 +0000
+++ b/sys/arch/i386/stand/efiboot/efidisk.c     Wed Apr 17 06:50:34 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efidisk.c,v 1.6 2018/04/11 10:32:09 nonaka Exp $       */
+/*     $NetBSD: efidisk.c,v 1.7 2019/04/17 06:50:34 nonaka Exp $       */
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka <nonaka%netbsd.org@localhost>
@@ -57,8 +57,7 @@
        status = LibLocateHandle(ByProtocol, &BlockIoProtocol, NULL,
            &nhandles, &handles);
        if (EFI_ERROR(status))
-               panic("LocateHandle(BlockIoProtocol): %" PRIxMAX,
-                   (uintmax_t)status);
+               return;
 
        if (efi_bootdp != NULL)
                depth = efi_device_path_depth(efi_bootdp, MEDIA_DEVICE_PATH);
@@ -76,8 +75,7 @@
                status = uefi_call_wrapper(BS->HandleProtocol, 3, handles[i],
                    &BlockIoProtocol, (void **)&bio);
                if (EFI_ERROR(status))
-                       panic("HandleProtocol(BlockIoProtocol): %" PRIxMAX,
-                           (uintmax_t)status);
+                       continue;
 
                media = bio->Media;
                if (media->LogicalPartition || !media->MediaPresent)



Home | Main Index | Thread Index | Old Index