diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/isa/spkr.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/isa/spkr.c b/sys/dev/isa/spkr.c index 0fdd7ee0de7..51857ccc796 100644 --- a/sys/dev/isa/spkr.c +++ b/sys/dev/isa/spkr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spkr.c,v 1.10 2006/03/09 22:35:23 miod Exp $ */ +/* $OpenBSD: spkr.c,v 1.11 2009/10/31 01:13:00 fgsch Exp $ */ /* $NetBSD: spkr.c,v 1.1 1998/04/15 20:26:18 drochner Exp $ */ /* @@ -53,6 +53,7 @@ #include <sys/proc.h> #include <sys/ioctl.h> #include <sys/conf.h> +#include <sys/file.h> #include <dev/isa/pcppivar.h> @@ -501,6 +502,15 @@ spkrioctl(dev, cmd, data, flag, p) switch (cmd) { case SPKRTONE: + case SPKRTUNE: + if ((flag & FWRITE) == 0) + return (EACCES); + default: + break; + } + + switch (cmd) { + case SPKRTONE: tp = (tone_t *)data; if (tp->frequency == 0) |