From 6bfca3cca518b043bf35ac90ad6dbc91da872de5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 4 Jun 2002 11:18:46 +0000 Subject: * fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if requested mode isn't supported. --- winsup/cygwin/fhandler_dsp.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/fhandler_dsp.cc') diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc index 6ea8f3cbd..907eb24e8 100644 --- a/winsup/cygwin/fhandler_dsp.cc +++ b/winsup/cygwin/fhandler_dsp.cc @@ -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); -- cgit v1.2.3