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>2006-02-09 17:42:48 +0300
committerCorinna Vinschen <corinna@vinschen.de>2006-02-09 17:42:48 +0300
commit30f1c8a675f8fe65ecc0ea06dd7ce1eb50b4b3b7 (patch)
tree59c38307edf529851ba58a04aafca7aa835f538a
parent9d1c0a60533d82292c1b3595c16b87aa571623d2 (diff)
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
the dirent_get_d_ino flag on filesystems having useful File IDs. Add comment explaining why.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc16
2 files changed, 19 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4881f97e6..20260ddcd 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
+ the dirent_get_d_ino flag on filesystems having useful File IDs.
+ Add comment explaining why.
+
2006-02-07 Corinna Vinschen <corinna@vinschen.de>
* dtable.cc (handle_to_fn): Accomodate new argument order in call to
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 6edd010b6..3d286ebe9 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1450,10 +1450,20 @@ fhandler_disk_file::opendir ()
__seterrno ();
goto free_dirent;
}
- if (wincap.has_fileid_dirinfo ())
- dir->__flags |= dirent_get_d_ino;
+ /* FileIdBothDirectoryInformation is apparently unsupported on XP
+ when accessing directories on UDF. When trying to use it so,
+ NtQueryDirectoryFile returns with STATUS_ACCESS_VIOLATION. It's
+ not clear if the call isn't also unsupported on other OS/FS
+ combinations (say, Win2K/CDFS or so). Instead of testing in
+ readdir for yet another error code, let's use
+ FileIdBothDirectoryInformation only on filesystems supporting
+ persistent ACLs, FileBothDirectoryInformation otherwise. */
if (pc.hasgood_inode ())
- dir->__flags |= dirent_set_d_ino;
+ {
+ dir->__flags |= dirent_set_d_ino;
+ if (wincap.has_fileid_dirinfo ())
+ dir->__flags |= dirent_get_d_ino;
+ }
}
res = dir;
}