Subject: Re: wskbd ioctl question
To: current-users@netbsd.org, Chris Jones <cjones@rupert.honors.montana.edu>
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: current-users
Date: 09/03/1998 21:59:39
Excerpts from netbsd: 3-Sep-98 wskbd ioctl question Chris
Jones@rupert.honor (987)
> I open the device (/dev/ttyE0 or /dev/wskbd) as O_RDWR,
> and then I try to do a WSKBDIO_BELL ioctl. It says, "Permission
> denied.
Hmm. Just tried the appended program, and got a beep.
> Maybe my kernel (-current from Aug
> 13) has different code than my sources (Sep 2)?
There are no changes to wscons which could explain this.
best regards
Matthias
#include <stdio.h>
#include <fcntl.h>
#include <err.h>
#include <dev/wscons/wsconsio.h>
main()
{
int a, b;
a = open("/dev/ttyE0", O_RDWR, 0);
if (a < 0)
err(1, "open");
b = ioctl(a, WSKBDIO_BELL, 0);
if (b < 0)
err(1, "ioctl");
}