kernel32: add more tracing to GetDiskFreeSpaceW

Dmitry Timoshkov dmitry at baikal.ru
Fri May 4 23:29:25 CDT 2012


Austin English <austinenglish at gmail.com> wrote:

> @@ -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);

Why not print in the values directly from info structure? That way all the data
are in the trace regardless of what info appication requested. I'd guess that
printing valus in hex would be more readable, and once the data is printed in
hex  it should be obvious when the values were capped, making 'capped' flag
redundant.

-- 
Dmitry.



More information about the wine-devel mailing list