Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-06-04 15:18:46 +0400
committerCorinna Vinschen <corinna@vinschen.de>2002-06-04 15:18:46 +0400
commit6bfca3cca518b043bf35ac90ad6dbc91da872de5 (patch)
tree5a9d00a3935694784c212c0e80a1df0d2a79a9fd
parente02f1e9c81debf68a7948ffbd3f8177e0ec0fc59 (diff)
* fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if
requested mode isn't supported.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_dsp.cc5
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index cd012c636..1285b795a 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
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);