summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_disk_file.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-09-27 09:35:06 +0000
committerCorinna Vinschen <corinna@vinschen.de>2007-09-27 09:35:06 +0000
commitb75971ef8a9ea404cd31d553634d6d1d46159b59 (patch)
treefd0bbe15917b6df4387b7bafe622b866438c0e42 /winsup/cygwin/fhandler_disk_file.cc
parentdfbd95d35daf34da9be778483aced82e973154f0 (diff)
downloadcygnal-b75971ef8a9ea404cd31d553634d6d1d46159b59.tar.gz
cygnal-b75971ef8a9ea404cd31d553634d6d1d46159b59.tar.bz2
cygnal-b75971ef8a9ea404cd31d553634d6d1d46159b59.zip
* ntdll.h (struct _FILE_COMPRESSION_INFORMATION): Align with definition
in w32api / MSDN. * fhandler_disk_file.cc (fhandler_base::fstat_helper): Accommodate change to struct _FILE_COMPRESSION_INFORMATION.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index c7c5d9f23..095c779e8 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -506,7 +506,8 @@ fhandler_base::fstat_helper (struct __stat64 *buf,
sizeof fci, FileCompressionInformation))
/* Otherwise we request the actual amount of bytes allocated for
compressed and sparsed files. */
- buf->st_blocks = (fci.CompressedSize.QuadPart + S_BLKSIZE - 1) / S_BLKSIZE;
+ buf->st_blocks = (fci.CompressedFileSize.QuadPart + S_BLKSIZE - 1)
+ / S_BLKSIZE;
else
/* Otherwise compute no. of blocks from file size. */
buf->st_blocks = (buf->st_size + S_BLKSIZE - 1) / S_BLKSIZE;