From owner-svn-src-all@FreeBSD.ORG Thu Jun 19 13:49:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F407D3C; Thu, 19 Jun 2014 13:49:07 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id AE2BC224F; Thu, 19 Jun 2014 13:49:06 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 6D5B420E7088B; Thu, 19 Jun 2014 13:48:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,HELO_NO_DOMAIN,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id 0509D20E70885; Thu, 19 Jun 2014 13:48:53 +0000 (UTC) Message-ID: <11AED2470A6E45B1A3BB2B9549C78B62@multiplay.co.uk> From: "Steven Hartland" To: "Aleksandr Rybalko" , , , References: <201406182230.s5IMUMYp006946@svn.freebsd.org> Subject: Re: svn commit: r267626 - head/sys/dev/vt Date: Thu, 19 Jun 2014 14:48:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 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: Thu, 19 Jun 2014 13:49:07 -0000 As per man 9 sysctl negative logic should be avoided so we should use enable instead ot disable here: kern.vt.enable with a default of 1 With the user setting kern.vt.enable=0 to disable. Regards Steve ----- Original Message ----- From: "Aleksandr Rybalko" To: ; ; Sent: Wednesday, June 18, 2014 11:30 PM Subject: svn commit: r267626 - head/sys/dev/vt > 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, > >