summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-08-20 08:52:25 +0000
committerCorinna Vinschen <corinna@vinschen.de>2010-08-20 08:52:25 +0000
commitdd442880afd7e5b4fcd4cfea35c010dbd24f8266 (patch)
tree47e3ad20743a3f775f8afc6d09e2a0af0779e3ac
parentfb20493f3d7640a8ad54c00d2451d428ec39b017 (diff)
downloadcygnal-dd442880afd7e5b4fcd4cfea35c010dbd24f8266.tar.gz
cygnal-dd442880afd7e5b4fcd4cfea35c010dbd24f8266.tar.bz2
cygnal-dd442880afd7e5b4fcd4cfea35c010dbd24f8266.zip
* fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Revert usage
of get_stat_handle () to get_handle (). Add comment to explain why. * syscalls.cc (statvfs): Drop using PC_KEEP_HANDLE.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc6
-rw-r--r--winsup/cygwin/syscalls.cc3
3 files changed, 12 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 6fa859452..b7dd1580f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Revert usage
+ of get_stat_handle () to get_handle (). Add comment to explain why.
+ * syscalls.cc (statvfs): Drop using PC_KEEP_HANDLE.
+
2010-08-19 Corinna Vinschen <corinna@vinschen.de>
* external.cc (sync_wincwd): New function.
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index c860655d5..4054941eb 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -756,7 +756,11 @@ fhandler_disk_file::fstatvfs (struct statvfs *sfs)
IO_STATUS_BLOCK io;
FILE_FS_FULL_SIZE_INFORMATION full_fsi;
FILE_FS_SIZE_INFORMATION fsi;
- HANDLE fh = get_stat_handle ();
+ /* We must not use the stat handle here, even if it exists. The handle
+ has been opened with FILE_OPEN_REPARSE_POINT, thus, in case of a volume
+ mount point, it points to the FS of the mount point, rather than to the
+ mounted FS. */
+ HANDLE fh = get_handle ();
if (!fh)
{
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index aaa4673a1..f13273c9f 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -2568,8 +2568,7 @@ statvfs (const char *name, struct statvfs *sfs)
if (efault.faulted (EFAULT))
goto error;
- if (!(fh = build_fh_name (name, PC_SYM_FOLLOW | PC_KEEP_HANDLE,
- stat_suffixes)))
+ if (!(fh = build_fh_name (name, PC_SYM_FOLLOW, stat_suffixes)))
goto error;
if (fh->error ())