* fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if

requested mode isn't supported.
This commit is contained in:
Corinna Vinschen 2002-06-04 11:18:46 +00:00
parent e02f1e9c81
commit 6bfca3cca5
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2002-06-03 Corinna Vinschen <corinna@vinschen.de>
* fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if
requested mode isn't supported.
2002-06-03 Christopher Faylor <cgf@redhat.com>
* fhandler.cc (fhandler_base::open): Don't set binmode if already set.

View File

@ -434,7 +434,10 @@ fhandler_dev_dsp::open (path_conv *, int flags, mode_t mode)
{
// currently we only support writing
if ((flags & (O_WRONLY | O_RDONLY | O_RDWR)) != O_WRONLY)
return 0;
{
set_errno (EACCES);
return 0;
}
set_flags (flags);