chenall / grubutils

utils for grub4dos
http://chenall.net
100 stars 35 forks source link

FAT can give wrong free space on FAT32 partitions >= 4GB #12

Closed deomsh closed 1 year ago

deomsh commented 1 year ago

Grubutil FAT can give wrong available space on FAT32 partitions >= 4GB.

Total space is correctly calculated, but available space is sometimes wrong. Looking at function 'FAT info' number of free clusters is correct, sectors per cluster too.

In following case multiplication of number of free clusters and sectors per cluster is wrong, 'FAT mkfile' refuses to create a file. I observed same problem with 'FAT copy' earlier. Used is 8GB FAT32 device (hd1,0):

BUG in FAT free space wrong on drives from 4GB upwards I

BTW output of 'FAT info' is compared with grub4dos script FATINFO.G4B (unpublished). This script directly reads-out all values from disk. So everything is fine, except result of multiplication in cases like these.

To me it seems the problem has something to do with free space >= 4GB. Maybe somehow with 64-bit values not fully 'good' in the multiplication, or while using the result of the multiplication?

deomsh commented 1 year ago

Thanks, all tested and working now.

See http://reboot.pro/index.php?showtopic=22743#entry222267

Op za 1 apr 2023 om 03:22 schreef A1ive @.***>:

Closed #12 https://github.com/chenall/grubutils/issues/12 as completed via #13 https://github.com/chenall/grubutils/pull/13.

— Reply to this email directly, view it on GitHub https://github.com/chenall/grubutils/issues/12#event-8902943481, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQET5I3PDQ5IVGH53IQ7WPLW657OHANCNFSM6AAAAAAWDDVE4M . You are receiving this because you authored the thread.Message ID: @.***>