From owner-svn-src-all@FreeBSD.ORG Tue May 6 13:52:14 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 79DD7DE9; Tue, 6 May 2014 13:52:14 +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 67FEC1BD; Tue, 6 May 2014 13:52:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s46DqESp025251; Tue, 6 May 2014 13:52:14 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s46DqE9a025250; Tue, 6 May 2014 13:52:14 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201405061352.s46DqE9a025250@svn.freebsd.org> From: Aleksandr Rybalko Date: Tue, 6 May 2014 13:52:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265442 - 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: Tue, 06 May 2014 13:52:14 -0000 Author: ray Date: Tue May 6 13:52:13 2014 New Revision: 265442 URL: http://svnweb.freebsd.org/changeset/base/265442 Log: Implement KDMKTONE ioctl. Submitted by: Matthew D.Fuller (original version) MFC: 7 days PR: kern/189170 Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Tue May 6 13:46:36 2014 (r265441) +++ head/sys/dev/vt/vt_core.c Tue May 6 13:52:13 2014 (r265442) @@ -1732,9 +1732,17 @@ skip_thunk: td->td_frame->tf_rflags &= ~PSL_IOPL; #endif return (0); - case KDMKTONE: /* sound the bell */ - /* TODO */ + case KDMKTONE: { /* sound the bell */ + int freq, period; + + freq = 1193182 / ((*(int*)data) & 0xffff); + period = (((*(int*)data)>>16) & 0xffff) * hz / 1000; + if(*(int*)data) + sysbeep(freq, period); + else + vtterm_bell(tm); return (0); + } case KIOCSOUND: /* make tone (*data) hz */ /* TODO */ return (0);