patch-2.1.52 linux/drivers/char/vt.c

Next file: linux/drivers/misc/BUGS-parport
Previous file: linux/drivers/char/mem.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.51/linux/drivers/char/vt.c linux/drivers/char/vt.c
@@ -490,6 +490,8 @@
 	case KIOCSOUND:
 		if (!perm)
 			return -EPERM;
+		if (arg)
+			arg = 1193180 / arg;
 		kd_mksound(arg, 0);
 		return 0;
 
@@ -505,6 +507,8 @@
 		 */
 		ticks = HZ * ((arg >> 16) & 0xffff) / 1000;
 		count = ticks ? (arg & 0xffff) : 0;
+		if (count)
+			count = 1193180 / count;
 		kd_mksound(count, ticks);
 		return 0;
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov