From ae866603c77899efeb618baec79eaf71d233ba50 Mon Sep 17 00:00:00 2001 From: Aleksandr Rybalko Date: Mon, 12 May 2014 19:29:38 +0000 Subject: [PATCH] Update terminal sizes in any case when new vt(4) driver arrive. (Plus remove one unused newline) Sponsored by: The FreeBSD Foundation --- sys/dev/vt/vt_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 4b006a2addd5..43756e51bbea 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -1981,8 +1981,11 @@ vt_upgrade(struct vt_device *vd) unsigned int i; /* Device didn't pass vd_init() or already upgraded. */ - if (vd->vd_flags & (VDF_ASYNC|VDF_DEAD)) + if (vd->vd_flags & (VDF_ASYNC|VDF_DEAD)) { + /* Refill settings with new sizes anyway. */ + vt_resize(vd); return; + } vd->vd_flags |= VDF_ASYNC; for (i = 0; i < VT_MAXWINDOWS; i++) { @@ -2019,7 +2022,6 @@ vt_upgrade(struct vt_device *vd) /* Refill settings with new sizes. */ vt_resize(vd); - } static void