diff options
author | 2017-06-01 11:32:15 +0000 | |
---|---|---|
committer | 2017-06-01 11:32:15 +0000 | |
commit | 84edde9b2b74d9b65c127f461c44a28348b22cc8 (patch) | |
tree | 138bc8356527c64564ff8bd4b82b70707f85ceda | |
parent | Sync with amd64 and allow building the i386 bootstrap with clang: (diff) | |
download | wireguard-openbsd-84edde9b2b74d9b65c127f461c44a28348b22cc8.tar.xz wireguard-openbsd-84edde9b2b74d9b65c127f461c44a28348b22cc8.zip |
Don't panic when we cannot locate a handle for the Serial IO protocol.
Fixes reports on tech and in private.
ok yasuoka@ stsp@
-rw-r--r-- | sys/arch/amd64/stand/efiboot/conf.c | 4 | ||||
-rw-r--r-- | sys/arch/amd64/stand/efiboot/efiboot.c | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/amd64/stand/efiboot/conf.c b/sys/arch/amd64/stand/efiboot/conf.c index c02719d1327..3b2059e414f 100644 --- a/sys/arch/amd64/stand/efiboot/conf.c +++ b/sys/arch/amd64/stand/efiboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.7 2017/05/31 08:40:32 yasuoka Exp $ */ +/* $OpenBSD: conf.c,v 1.8 2017/06/01 11:32:15 patrick Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -38,7 +38,7 @@ #include "efiboot.h" #include "efidev.h" -const char version[] = "3.32"; +const char version[] = "3.33"; #ifdef EFI_DEBUG int debug = 0; diff --git a/sys/arch/amd64/stand/efiboot/efiboot.c b/sys/arch/amd64/stand/efiboot/efiboot.c index 25e34c1a93b..9b6d5fc00fd 100644 --- a/sys/arch/amd64/stand/efiboot/efiboot.c +++ b/sys/arch/amd64/stand/efiboot/efiboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efiboot.c,v 1.19 2017/05/31 08:40:32 yasuoka Exp $ */ +/* $OpenBSD: efiboot.c,v 1.20 2017/06/01 11:32:15 patrick Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -526,8 +526,10 @@ efi_com_probe(struct consdev *cn) status = EFI_CALL(BS->LocateHandle, ByProtocol, &serio_guid, 0, &sz, handles); } - if (handles == NULL || EFI_ERROR(status)) - panic("could not get handles of serial i/o"); + if (handles == NULL || EFI_ERROR(status)) { + free(handles, sz); + return; + } for (i = 0; i < sz / sizeof(EFI_HANDLE); i++) { /* |