vt(4): Refuse to load a font if hw.vga.textmode is selected

Before, the font was loaded and the window size recalculated, giving an
unusable terminal, even if the actual font didn't change.

Reported by:	beeessdee@ruggedinbox.com
MFC after:	3 days
This commit is contained in:
Jean-Sébastien Pédron 2014-10-20 14:25:23 +00:00
parent a141b6722c
commit 2113857ae0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273330

View File

@ -2207,6 +2207,9 @@ vtterm_ioctl(struct terminal *tm, u_long cmd, caddr_t data,
case PIO_VFONT: {
struct vt_font *vf;
if (vd->vd_flags & VDF_TEXTMODE)
return (ENOTSUP);
error = vtfont_load((void *)data, &vf);
if (error != 0)
return (error);