DragonFly BSD
DragonFly bugs List (threaded) for 2006-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: turning off the beep


From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Tue, 10 Jan 2006 01:03:02 +0900

On Mon, Jan 09, 2006 at 10:07:22AM -0500, Erik V. Smith wrote:
> YONETANI Tomokazu wrote:
> >+		bell = 0, duration = 0, pitch = 0;
> 
> variable "bell" is being initialized to zero on line 861 of
> kbdcontrol.c, so I'm affraid this won't work.

Well, I missed the tilde here:
        if ((bell & ~2) == 0)
                fprintf(stderr, "\x1B[=%d;%dB", pitch, duration);
which made me interpret the statement as `when quiet bit not set'...

Anyway, it turned out that both `-b off' and '-b quiet.off' turns off
the bell for me, without or without the patch :-]  Do you see something
if you change the line calling ioctl() to something below?

	if (ioctl(0, CONS_BELLTYPE, &bell) == -1)
		perror("CONS_BELLTYPE");
	if ((bell & ~2) == 0)
		fprintf(stderr, "\x1B[=%d;%dB", pitch, duration);

If so, you may have to dig into scioctl() to find where it's failing
to set flags or flash the screen.



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]