Hi!

29-Июл-2005 20:45 [EMAIL PROTECTED] (Eric Auer) wrote to
[email protected]:

>> +                for (shift = 21; --shift;)
>> +                        {
>> +                        if ((clustersize & 1) == 0) clustersize >>= 1;
>> +                        else FAT32_Free_Space.free_clusters >>= 1;
>> +                        }
>>      After this loop clustersize==1...
EA> Yes but this is intended: Shift clustersize AND

     Sure, I understand this loop: .free_clusters*clustersize divided by
2^20 to get Mbytes instead plain bytes. But I say not about this.

>> +                convert(FAT32_Free_Space.free_clusters * clustersize,
>> ...so this multiplication equal to ".free_clusters * 1". Forgeted to
>> eliminate multiplication?
EA> Depends. The whole story started when we found out that NTFS4DOS uses
EA> invented cluster sizes (like "64 sectors of 32kilobytes each") when

     (NTFS4DOS authors search the troubles for themselves.)

EA> it reports the amount of free/used space through the FAT32 interface
EA> int 21.7303... Such invented cluster sizes can be bigger than 1 MB,
EA> and I would not be surprised if some tools even use values which are
EA> no powers of 2, so it is probably better to keep the multiplication in.
EA> And, again, clustersize can be 2 MB, that >>= 20 is still more than 1.

     Well, nice reason. Why not comment this explicitly in sources?




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to