mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 02:50:25 +08:00
* fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Try the
FileFsSizeInformation information class on filesystems choking on FileFsFullSizeInformation (I see you Netapp!)
This commit is contained in:
parent
dd48219ba9
commit
c51ce2447a
@ -1,3 +1,9 @@
|
||||
2014-08-28 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Try the
|
||||
FileFsSizeInformation information class on filesystems choking on
|
||||
FileFsFullSizeInformation (I see you Netapp!)
|
||||
|
||||
2014-08-27 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.h (fhandler_pty_slave::fch_open_handles): Add bool parameter
|
||||
|
@ -800,6 +800,26 @@ fhandler_disk_file::fstatvfs (struct statvfs *sfs)
|
||||
}
|
||||
ret = 0;
|
||||
}
|
||||
else if (status == STATUS_INVALID_PARAMETER /* Netapp */
|
||||
|| status == STATUS_INVALID_INFO_CLASS)
|
||||
{
|
||||
FILE_FS_SIZE_INFORMATION fsi;
|
||||
status = NtQueryVolumeInformationFile (fh, &io, &fsi, sizeof fsi,
|
||||
FileFsSizeInformation);
|
||||
if (NT_SUCCESS (status))
|
||||
{
|
||||
sfs->f_bsize = fsi.BytesPerSector * fsi.SectorsPerAllocationUnit;
|
||||
sfs->f_frsize = sfs->f_bsize;
|
||||
sfs->f_blocks = (fsblkcnt_t) fsi.TotalAllocationUnits.QuadPart;
|
||||
sfs->f_bfree = sfs->f_bavail =
|
||||
(fsblkcnt_t) fsi.AvailableAllocationUnits.QuadPart;
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
debug_printf ("%y = NtQueryVolumeInformationFile"
|
||||
"(%S, FileFsSizeInformation)",
|
||||
status, pc.get_nt_native_path ());
|
||||
}
|
||||
else
|
||||
debug_printf ("%y = NtQueryVolumeInformationFile"
|
||||
"(%S, FileFsFullSizeInformation)",
|
||||
|
Loading…
x
Reference in New Issue
Block a user