>Number:         189170
>Category:       kern
>Synopsis:       [PATCH] [newcons] Implement KDMKTONE ioctl
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 01 08:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Matthew D. Fuller
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD draco.over-yonder.net 9.1-STABLE FreeBSD 9.1-STABLE #0 r251584: 
Sun Jun 9 14:23:33 CDT 2013 
r...@draco.over-yonder.net:/usr/obj/usr/src/sys/DRACO amd64


        
>Description:
        newcons has KDMKTONE ioctl stubbed out, which means that things that
        try to sound the bell (like X) wind up doing nothing.  And working
        with X is a big part of the push for newcons, so it should do so  :)

>How-To-Repeat:
        
>Fix:


Index: sys/dev/vt/vt_core.c
===================================================================
--- sys/dev/vt/vt_core.c        (revision 264991)
+++ sys/dev/vt/vt_core.c        (working copy)
@@ -1636,7 +1636,11 @@
 #endif
                return (0);
        case KDMKTONE:          /* sound the bell */
-               /* TODO */
+               if(*(int*)data)
+                       sysbeep(1193182 / ((*(int*)data)&0xffff),
+                               (((*(int*)data)>>16)&0xffff)*hz/1000);
+               else
+                       vtterm_bell(tm);
                return (0);
        case KIOCSOUND:         /* make tone (*data) hz */
                /* TODO */

>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to