On Fri, 11 Nov 2005 18:55:33 +0100 Patrick Leslie Polzer <[EMAIL PROTECTED]> wrote:
> On Fri, 11 Nov 2005 17:28:54 +0100 > K.G. <"K.G." <[EMAIL PROTECTED]>> wrote: > > > (PED_SECTOR_SIZE was and now PED_SECTOR_SIZE_DEFAULT > > (which has a too long name ;) is of type long long, and > > sector_size is intended to replace it, so...) > Why is it 64 bit long? Because you can multiply anything with it and obtain a 64 bits value, especially in the case of a 32 bits FS you can multiply a sector count of 4000000000 from a uint32_t by PED_SECTOR_SIZE_DEFAULT and the result won't overflow (provided you store it in a large enough variable, or divide it just after that with a large enough value, or whatever). Whether or not some code makes use of that, i don't know. But the safe and lazy solution is to make sector_size a long long (or a PedSector, that's the same thing). The less lazy solution is to check all the code. Guillaume _______________________________________________ Bug-parted mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-parted
