kern/189170: [PATCH] [newcons] Implement KDMKTONE ioctl

Matthew D.Fuller fullermd at
Thu May 1 08:30:00 UTC 2014

>Number:         189170
>Category:       kern
>Synopsis:       [PATCH] [newcons] Implement KDMKTONE ioctl
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 01 08:30:00 UTC 2014
>Originator:     Matthew D. Fuller
>Release:        FreeBSD 9.1-STABLE amd64
System: FreeBSD 9.1-STABLE FreeBSD 9.1-STABLE #0 r251584: Sun Jun 9 14:23:33 CDT 2013 root at amd64

	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  :)


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 @@
 		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 */


More information about the freebsd-bugs mailing list