Comment 2 for bug 912259

Revision history for this message
Magnus Karlsson (u-magnds-b) wrote :

See Bug #932321: getNumberOfSectors() returns incorrect number

The program is using an incorrect way to figure out the raw device size. The correct way is to ask for the partition size of the raw disk rather than trying to use the disk geometry information (like cylinders, tracks/cylinder, sectors/track) to figure out the device size since those numbers are just made up by windows to give an approximation of the disk size. There is no size information on the SD card about "cylinders" or "tracks" etc, just the raw block count (1 block = 512 bytes = 1 "sector").