From owner-svn-src-all@FreeBSD.ORG Wed Dec 25 19:07:15 2013 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 707465BD; Wed, 25 Dec 2013 19:07:15 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5D17D1B14; Wed, 25 Dec 2013 19:07:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPJ7Fsg062666; Wed, 25 Dec 2013 19:07:15 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPJ7FnY062664; Wed, 25 Dec 2013 19:07:15 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201312251907.rBPJ7FnY062664@svn.freebsd.org> From: Aleksandr Rybalko Date: Wed, 25 Dec 2013 19:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259882 - 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.17 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, 25 Dec 2013 19:07:15 -0000 Author: ray Date: Wed Dec 25 19:07:14 2013 New Revision: 259882 URL: http://svnweb.freebsd.org/changeset/base/259882 Log: Use statndard (syscons) way to disable bell. Testesd by: markj Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Wed Dec 25 18:25:58 2013 (r259881) +++ head/sys/dev/vt/vt.h Wed Dec 25 19:07:14 2013 (r259882) @@ -135,6 +135,7 @@ struct vt_device { #define VDF_DEAD 0x10 /* Early probing found nothing. */ #define VDF_INITIALIZED 0x20 /* vtterm_cnprobe already done. */ #define VDF_MOUSECURSOR 0x40 /* Mouse cursor visible. */ +#define VDF_QUIET_BELL 0x80 /* Disable bell. */ int vd_keyboard; /* (G) Keyboard index. */ unsigned int vd_kbstate; /* (?) Device unit. */ unsigned int vd_unit; /* (c) Device unit. */ Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Wed Dec 25 18:25:58 2013 (r259881) +++ head/sys/dev/vt/vt_core.c Wed Dec 25 19:07:14 2013 (r259882) @@ -589,6 +589,11 @@ vt_allocate_keyboard(struct vt_device *v static void vtterm_bell(struct terminal *tm) { + struct vt_window *vw = tm->tm_softc; + struct vt_device *vd = vw->vw_device; + + if (vd->vd_flags & VDF_QUIET_BELL) + return; sysbeep(1193182 / VT_BELLPITCH, VT_BELLDURATION); } @@ -1505,6 +1510,12 @@ skip_thunk: /* XXX */ *(int *)data = M_CG640x480; return (0); + case CONS_BELLTYPE: /* set bell type sound */ + if ((*(int *)data) & CONS_QUIET_BELL) + vd->vd_flags |= VDF_QUIET_BELL; + else + vd->vd_flags &= ~VDF_QUIET_BELL; + return (0); case CONS_GETINFO: { vid_info_t *vi = (vid_info_t *)data;