summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2015-11-26 20:26:21 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2015-11-26 20:26:21 +0000
commit8d2590bc9fb9fb92c02d91b6fe7c04f9aefe010d (patch)
tree2440d837a9129d7bf241eb73c610eeb0a3fee2cf /sys/arch/amd64/stand
parent056fffbf1f75b7296492e743c3948471252a6af5 (diff)
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
Diffstat (limited to 'sys/arch/amd64/stand')
-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;