diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2008-06-17 16:51:41 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2008-06-17 16:51:41 +0000 |
commit | 7b462ff46148fe71632532dd5aa1af48e5c69333 (patch) | |
tree | 3f890b22fb0db440af78ef000700b29cca72f828 /sys | |
parent | 129acbef45063130f2ba58cbbdf48b755432ca95 (diff) |
if reading (or writing) is not supported, but the device is opened
for reading (or writing), return ENXIO (Device not configured) instead
of EACCES (Permission denied).
ok ratchov
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uaudio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c index 6cfa9e0f822..1199cf54613 100644 --- a/sys/dev/usb/uaudio.c +++ b/sys/dev/usb/uaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uaudio.c,v 1.57 2008/04/21 00:32:43 jakemsr Exp $ */ +/* $OpenBSD: uaudio.c,v 1.58 2008/06/17 16:51:40 jakemsr Exp $ */ /* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */ /* @@ -2074,9 +2074,9 @@ uaudio_open(void *addr, int flags) return (EIO); if ((flags & FWRITE) && !(sc->sc_mode & AUMODE_PLAY)) - return (EACCES); + return (ENXIO); if ((flags & FREAD) && !(sc->sc_mode & AUMODE_RECORD)) - return (EACCES); + return (ENXIO); return (0); } |