kernel32: add more tracing to GetDiskFreeSpaceW
Austin English
austinenglish at gmail.com
Fri May 4 13:58:06 CDT 2012
http://bugs.winehq.org/show_bug.cgi?id=30592
--
-Austin
-------------- next part --------------
diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c
index 23bcca1..0d1df5f 100644
--- a/dlls/kernel32/volume.c
+++ b/dlls/kernel32/volume.c
@@ -1652,6 +1652,7 @@ BOOL WINAPI GetDiskFreeSpaceW( LPCWSTR root, LPDWORD cluster_sectors,
NTSTATUS status;
HANDLE handle;
UINT units;
+ int capped = 0;
TRACE( "%s,%p,%p,%p,%p\n", debugstr_w(root),
cluster_sectors, sector_bytes, free_clusters, total_clusters );
@@ -1670,6 +1671,7 @@ BOOL WINAPI GetDiskFreeSpaceW( LPCWSTR root, LPDWORD cluster_sectors,
if( GetVersion() & 0x80000000) { /* win3.x, 9x, ME */
/* cap the size and available at 2GB as per specs */
+ capped = 1;
if (info.TotalAllocationUnits.QuadPart * units > 0x7fffffff) {
info.TotalAllocationUnits.QuadPart = 0x7fffffff / units;
if (info.AvailableAllocationUnits.QuadPart * units > 0x7fffffff)
@@ -1687,6 +1689,8 @@ BOOL WINAPI GetDiskFreeSpaceW( LPCWSTR root, LPDWORD cluster_sectors,
if (sector_bytes) *sector_bytes = info.BytesPerSector;
if (free_clusters) *free_clusters = info.AvailableAllocationUnits.u.LowPart;
if (total_clusters) *total_clusters = info.TotalAllocationUnits.u.LowPart;
+ TRACE("%u, %u, %u, %u, capped=%d\n", cluster_sectors ? *cluster_sectors : 0, sector_bytes ? *sector_bytes : 0,
+ free_clusters ? *free_clusters : 0, total_clusters ? *total_clusters : 0, capped);
return TRUE;
}
More information about the wine-patches
mailing list