Module Name: src
Committed By: nonaka
Date: Wed Apr 17 06:50:34 UTC 2019
Modified Files:
src/sys/arch/i386/stand/efiboot: efidisk.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/i386/stand/efiboot/efidisk.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/i386/stand/efiboot/efidisk.c
diff -u src/sys/arch/i386/stand/efiboot/efidisk.c:1.6 src/sys/arch/i386/stand/efiboot/efidisk.c:1.7
--- src/sys/arch/i386/stand/efiboot/efidisk.c:1.6 Wed Apr 11 10:32:09 2018
+++ src/sys/arch/i386/stand/efiboot/efidisk.c Wed Apr 17 06:50:34 2019
@@ -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 <[email protected]>
@@ -57,8 +57,7 @@ efi_disk_probe(void)
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 @@ efi_disk_probe(void)
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)