Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Oct 2014 14:40:01 +0000 (UTC)
From:      Jean-Sebastien Pedron <dumbbell@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r273037 - stable/10/sys/dev/vt
Message-ID:  <201410131440.s9DEe1Hv079184@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dumbbell
Date: Mon Oct 13 14:40:00 2014
New Revision: 273037
URL: https://svnweb.freebsd.org/changeset/base/273037

Log:
  vt(4): Don't recalculate buffer size if we don't know screen size
  
  (MFC of r272537)
  
  When the screen size is unknown, it's set to 0x0. We can't use that as
  the buffer size, otherwise, functions such as vtbuf_fill() will fail.
  
  This fixes a panic on RaspberryPi, where there's no vt(4) backend
  configured early in boot.
  
  PR:		193981
  Tested by:	danilo@

Modified:
  stable/10/sys/dev/vt/vt_core.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/vt/vt_core.c
==============================================================================
--- stable/10/sys/dev/vt/vt_core.c	Mon Oct 13 13:50:51 2014	(r273036)
+++ stable/10/sys/dev/vt/vt_core.c	Mon Oct 13 14:40:00 2014	(r273037)
@@ -1269,7 +1269,8 @@ vtterm_cnprobe(struct terminal *tm, stru
 	 * that we have the real viewable size, fix it in the static
 	 * buffer.
 	 */
-	vt_termsize(vd, vw->vw_font, &vw->vw_buf.vb_scr_size);
+	if (vd->vd_width != 0 && vd->vd_height != 0)
+		vt_termsize(vd, vw->vw_font, &vw->vw_buf.vb_scr_size);
 
 	vtbuf_init_early(&vw->vw_buf);
 	vt_winsize(vd, vw->vw_font, &wsz);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410131440.s9DEe1Hv079184>