From: patrick Date: Thu, 1 Jun 2017 11:32:15 +0000 (+0000) Subject: Don't panic when we cannot locate a handle for the Serial IO protocol. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=84edde9b2b74d9b65c127f461c44a28348b22cc8;p=openbsd Don't panic when we cannot locate a handle for the Serial IO protocol. Fixes reports on tech and in private. ok yasuoka@ stsp@ --- 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 @@ -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++) { /*