summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2015-11-26 20:26:20 +0000
committeryasuoka <yasuoka@openbsd.org>2015-11-26 20:26:20 +0000
commitb26479004b6e195573271acef9e55d0f6ec81f08 (patch)
tree9d7e790487832a04f21995e0a0d7565764fbffb7
parentFix "Bad value" error seen when building Mesa 11.0.6 which uses -Bsymbolic. (diff)
downloadwireguard-openbsd-b26479004b6e195573271acef9e55d0f6ec81f08.tar.xz
wireguard-openbsd-b26479004b6e195573271acef9e55d0f6ec81f08.zip
Avoid setting mode to GOP if the mode is unchanged. Also don't panic
if the setting mode is failed. reported and tested by Joe Gidi
-rw-r--r--sys/arch/amd64/stand/efiboot/efiboot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/stand/efiboot/efiboot.c b/sys/arch/amd64/stand/efiboot/efiboot.c
index 6dad131f707..04d50719c5f 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.9 2015/11/08 00:17:29 yasuoka Exp $ */
+/* $OpenBSD: efiboot.c,v 1.10 2015/11/26 20:26:20 yasuoka Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -526,10 +526,10 @@ efi_makebootargs(void)
bestsiz = gopsiz;
}
}
- if (bestmode >= 0) {
+ if (bestmode >= 0 && conout->Mode->Mode != bestmode) {
status = EFI_CALL(gop->SetMode, gop, bestmode);
if (EFI_ERROR(status))
- panic("GOP setmode failed(%d)", status);
+ printf("GOP setmode failed(%d)\n", status);
}
gopi = gop->Mode->Info;