From owner-svn-src-all@FreeBSD.ORG Tue Oct 14 19:10:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E03EA522; Tue, 14 Oct 2014 19:10:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB4268D3; Tue, 14 Oct 2014 19:10:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EJA0GG002364; Tue, 14 Oct 2014 19:10:00 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EJA0Eu002363; Tue, 14 Oct 2014 19:10:00 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201410141910.s9EJA0Eu002363@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Tue, 14 Oct 2014 19:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r273104 - releng/10.1/sys/dev/vt X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 19:10:01 -0000 Author: dumbbell Date: Tue Oct 14 19:10:00 2014 New Revision: 273104 URL: https://svnweb.freebsd.org/changeset/base/273104 Log: vt(4): Don't recalculate buffer size if we don't know screen size MF10: r273037 MFC: 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@ Approved by: re (marius) Modified: releng/10.1/sys/dev/vt/vt_core.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/dev/vt/vt_core.c ============================================================================== --- releng/10.1/sys/dev/vt/vt_core.c Tue Oct 14 19:01:11 2014 (r273103) +++ releng/10.1/sys/dev/vt/vt_core.c Tue Oct 14 19:10:00 2014 (r273104) @@ -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);