Implement KDMKTONE ioctl.
Submitted by: Matthew D.Fuller <fullermd@over-yonder.net> (original version) MFC: 7 days PR: kern/189170 Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
9925f09b81
commit
bf8ed13db7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265442
@ -1732,9 +1732,17 @@ vtterm_ioctl(struct terminal *tm, u_long cmd, caddr_t data,
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user