VFSVolumeSize overflow on 6GB + cards on Palm Centro

When I call VFSVolumeSize on Palm OS on Palm Centro with 6GB SanDisk card inserted, it returns 1810366464 as the size of the card, but 2098102272 bytes are used. Obviously, the overflow occurs with the size of the map.

Is there a way to detect this overflow and get the actual size of the map?

+1


source to share


1 answer


There is no great way to do this. The VFSVolumeSize API only uses 32-bit values, so it cannot correctly report a size greater than 4 GB. There are extension manager APIs that can tell you about the card slot, but none of them tell you about the block size or the number of blocks for the card.



You will see the same crash if you enter the Card Info app on your mdash device; it will also mis-size the map.

+1


source







All Articles