From owner-svn-src-all@FreeBSD.ORG Wed Jun 18 22:30:23 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 298A649A; Wed, 18 Jun 2014 22:30:23 +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 F1A8827FF; Wed, 18 Jun 2014 22:30:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5IMUMJj006951; Wed, 18 Jun 2014 22:30:22 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5IMUMYp006946; Wed, 18 Jun 2014 22:30:22 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201406182230.s5IMUMYp006946@svn.freebsd.org> From: Aleksandr Rybalko Date: Wed, 18 Jun 2014 22:30:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267626 - head/sys/dev/vt X-SVN-Group: head 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 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: Wed, 18 Jun 2014 22:30:23 -0000 Author: ray Date: Wed Jun 18 22:30:22 2014 New Revision: 267626 URL: http://svnweb.freebsd.org/changeset/base/267626 Log: Suspend vt(4) initialization if "kern.vt.disable" kenv is set. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt_consolectl.c head/sys/dev/vt/vt_core.c head/sys/dev/vt/vt_sysmouse.c Modified: head/sys/dev/vt/vt_consolectl.c ============================================================================== --- head/sys/dev/vt/vt_consolectl.c Wed Jun 18 22:23:10 2014 (r267625) +++ head/sys/dev/vt/vt_consolectl.c Wed Jun 18 22:30:22 2014 (r267626) @@ -73,6 +73,8 @@ static void consolectl_drvinit(void *unused) { + if (getenv("kern.vt.disable")) + return; make_dev(&consolectl_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "consolectl"); } Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Wed Jun 18 22:23:10 2014 (r267625) +++ head/sys/dev/vt/vt_core.c Wed Jun 18 22:30:22 2014 (r267626) @@ -215,6 +215,8 @@ static void vt_update_static(void *dummy) { + if (getenv("kern.vt.disable")) + return; if (main_vd->vd_driver != NULL) printf("VT: running with driver \"%s\".\n", main_vd->vd_driver->vd_name); @@ -957,6 +959,9 @@ vtterm_cnprobe(struct terminal *tm, stru struct vt_device *vd = vw->vw_device; struct winsize wsz; + if (getenv("kern.vt.disable")) + return; + if (vd->vd_flags & VDF_INITIALIZED) /* Initialization already done. */ return; @@ -1991,6 +1996,9 @@ vt_upgrade(struct vt_device *vd) struct vt_window *vw; unsigned int i; + if (getenv("kern.vt.disable")) + return; + for (i = 0; i < VT_MAXWINDOWS; i++) { vw = vd->vd_windows[i]; if (vw == NULL) { @@ -2056,6 +2064,9 @@ vt_allocate(struct vt_driver *drv, void struct vt_device *vd; struct winsize wsz; + if (getenv("kern.vt.disable")) + return; + if (main_vd->vd_driver == NULL) { main_vd->vd_driver = drv; printf("VT: initialize with new VT driver \"%s\".\n", Modified: head/sys/dev/vt/vt_sysmouse.c ============================================================================== --- head/sys/dev/vt/vt_sysmouse.c Wed Jun 18 22:23:10 2014 (r267625) +++ head/sys/dev/vt/vt_sysmouse.c Wed Jun 18 22:30:22 2014 (r267626) @@ -405,6 +405,8 @@ static void sysmouse_drvinit(void *unused) { + if (getenv("kern.vt.disable")) + return; mtx_init(&sysmouse_lock, "sysmouse", NULL, MTX_DEF); cv_init(&sysmouse_sleep, "sysmrd"); make_dev(&sysmouse_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,