lkml.org 
[lkml]   [1996]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: KDMKTONE feature or bug?

>I recently upgraded my kernel and found my morse code program no
>longer worked. When run it would give a divide by zero error. I
>tracked this to /usr/src/linux/drivers/char/vt.c in the KDMKTONE
>area. In kernel 1.3.62 KDMKTONE was changed.

>If the functionality of KDMKTONE has changed would someone please tell
>me? If not I'd like to see this change in the kernel.

It looks to me like the Beep function in beepLinux.c in the morse code
program wasn't quite done correctly. (At least according to the
console_ioctl man page I looked at.)

Try changing the Beep function to look like this, and you'll be back
on the air.

int Beep(time, volume, pitch)
int time, volume, pitch;
{
AlarmWait();
ioctl(fd, KDMKTONE, (volume ? time << 16:0) | (pitch));
AlarmSet(time);
return 0;
}



\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.152 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site