svn commit: r265442 - head/sys/dev/vt
Aleksandr Rybalko
ray at FreeBSD.org
Tue May 6 13:52:14 UTC 2014
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 <fullermd at over-yonder.net> (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);
More information about the svn-src-all
mailing list