提交 a1a4849c 编写于 作者: G Gerd Hoffmann 提交者: Linus Torvalds

Refine SCREEN_INFO sanity check for vgacon initialization

Refine SCREEN_INFO sanity check for vgacon initialization.

Checking video mode field only to see whenever SCREEN_INFO is
initialized is not enougth, in some cases it is zero although
a vga card is present.  Lets additionally check cols and lines.
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
Cc: Alan <alan@lxorguk.ukuu.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: NEric W. Biederman <ebiederm@xmission.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 79974a0e
......@@ -368,9 +368,14 @@ static const char *vgacon_startup(void)
#endif
}
/* SCREEN_INFO initialized? */
if ((ORIG_VIDEO_MODE == 0) &&
(ORIG_VIDEO_LINES == 0) &&
(ORIG_VIDEO_COLS == 0))
goto no_vga;
/* VGA16 modes are not handled by VGACON */
if ((ORIG_VIDEO_MODE == 0x00) || /* SCREEN_INFO not initialized */
(ORIG_VIDEO_MODE == 0x0D) || /* 320x200/4 */
if ((ORIG_VIDEO_MODE == 0x0D) || /* 320x200/4 */
(ORIG_VIDEO_MODE == 0x0E) || /* 640x200/4 */
(ORIG_VIDEO_MODE == 0x10) || /* 640x350/4 */
(ORIG_VIDEO_MODE == 0x12) || /* 640x480/4 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册