[Fedora-livecd-list] List of previous issues with livecd-tools which should be addressed

Bruno Wolff III bruno at wolff.to
Sun Sep 12 02:42:55 UTC 2010


On Thu, Aug 19, 2010 at 13:14:21 -0500,
  Richard Shaw <hobbes1069 at gmail.com> wrote:
> 
> Ok, I understand what you're doing now, but I still think I'm right.
> If you use straight integer math, it does not round up for the last
> block. It does not round at all, it just drops the remainder. The
> easiest solution probably is to just add 1 to whatever size /
> BLOCK_SIZE returns.

The normal sematic for this kind of thing with integer division is:
(size + BLOCKSIZE - 1) / BLOCK_SIZE

(Unless integer overflows are possible.)

Otherwise if size is a multiple of BLOCK_SIZE the result would be 1 too large.


More information about the livecd mailing list