INT21_GetFreeDiskSpace fix
Rein Klazes
rklazes at xs4all.nl
Thu Jun 3 10:47:04 CDT 2004
Hi,
This makes MSVC++-16bits install stop complaining about too little disk
space.
Changelog:
dlls/winedos : int21.c
In INT21_GetFreeDiskSpace adjust the sectors-per-cluster value
to make the total number of clusters fit in a 16 bit register.
Rein.
--
Rein Klazes
rklazes at xs4all.nl
-------------- next part --------------
--- wine/dlls/winedos/int21.c 2004-04-27 07:34:57.000000000 +0200
+++ mywine/dlls/winedos/int21.c 2004-06-03 17:39:28.000000000 +0200
@@ -3397,6 +3397,12 @@
root[0] += INT21_MapDrive(DL_reg(context));
if (!GetDiskFreeSpaceW( root, &cluster_sectors, §or_bytes,
&free_clusters, &total_clusters )) return 0;
+ /* make sure that the number of clusters fits in a 16 bits value */
+ while( total_clusters & 0xffff0000) {
+ cluster_sectors <<= 1;
+ free_clusters >>= 1;
+ total_clusters >>= 1;
+ }
SET_AX( context, cluster_sectors );
SET_BX( context, free_clusters );
SET_CX( context, sector_bytes );
More information about the wine-patches
mailing list