From b96ab4102ef4d99e88b3ac3b81fb54cb308325e2 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Mon, 8 Apr 2019 04:07:37 +0000 Subject: [PATCH] Fix restoring the geometry when recovering from an error. Just restore the previous geometry, and don't do extra work to calculate the default geometry so as to reset to that. --- usr.sbin/vidcontrol/vidcontrol.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c index e556aa3b2616..b6cb30bb6256 100644 --- a/usr.sbin/vidcontrol/vidcontrol.c +++ b/usr.sbin/vidcontrol/vidcontrol.c @@ -171,9 +171,8 @@ revert(void) else ioctl(0, _IO('S', cur_info.video_mode_number), NULL); if (cur_info.video_mode_info.vi_flags & V_INFO_GRAPHICS) { - size[0] = cur_info.video_mode_info.vi_width / 8; - size[1] = cur_info.video_mode_info.vi_height / - cur_info.console_info.font_size; + size[0] = cur_info.console_info.mv_csz; + size[1] = cur_info.console_info.mv_rsz; size[2] = cur_info.console_info.font_size; ioctl(0, KDRASTER, size); }