]> sourceware.org Git - newlib-cygwin.git/commitdiff
Fix EIO error accessing certain (OS X SMB?) drives
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 21 Oct 2015 10:01:11 +0000 (12:01 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 21 Oct 2015 10:01:11 +0000 (12:01 +0200)
* path.cc (symlink_info::check_reparse_point): Don't generate an EIO
error if NtFsControlFile returns STATUS_NOT_A_REPARSE_POINT.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/ChangeLog
winsup/cygwin/path.cc
winsup/cygwin/release/2.3.0

index 59c7ca1cb381f8ebce9ec3174ff8c2ea9d158dd1..5d2675d6dfccb2643fa322e6145ea85f32274a75 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-21  Corinna Vinschen  <corinna@vinschen.de>
+
+       * path.cc (symlink_info::check_reparse_point): Don't generate an EIO
+       error if NtFsControlFile returns STATUS_NOT_A_REPARSE_POINT.
+
 2015-09-23  Evgeny Grin  <k2k@yandex.ru>
 
        * fhandler_socket.cc (fhandler_socket::wait_for_events): Fix compiler
index 89dbdabba314077e021fe298839ba59ca42458fa..488d4e6e08335205e01f2ec2d38e0caff8325c92 100644 (file)
@@ -2289,7 +2289,13 @@ symlink_info::check_reparse_point (HANDLE h, bool remote)
     {
       debug_printf ("NtFsControlFile(FSCTL_GET_REPARSE_POINT) failed, %y",
                    status);
-      set_error (EIO);
+      /* When accessing the root dir of some remote drives (observed with
+        OS X shares), the FILE_ATTRIBUTE_REPARSE_POINT flag is set, but
+        the followup call to NtFsControlFile(FSCTL_GET_REPARSE_POINT)
+        returns with STATUS_NOT_A_REPARSE_POINT.  That's quite buggy, but
+        we cope here with this scenario by not setting an error code. */
+      if (status != STATUS_NOT_A_REPARSE_POINT)
+       set_error (EIO);
       return 0;
     }
   if (rp->ReparseTag == IO_REPARSE_TAG_SYMLINK)
index 2f3adecaad9225f10531c914c82b0f219afba395..f2391a9666921dce0c9902e77256158710bb8cdf 100644 (file)
@@ -36,3 +36,6 @@ Bug Fixes
 - Fix a potential crash in advisory file locking due to usage of stack space
   out of scope.
   Addresses: https://cygwin.com/ml/cygwin/2015-09/msg00079.html
+
+- Fix EIO error accessing certain (OS X SMB?) drives
+  Addresses: https://cygwin.com/ml/cygwin/2015-09/msg00229.html
This page took 0.03908 seconds and 5 git commands to generate.