On Wed, 14 Jan 2004, Szakacsits Szabolcs wrote:
> ntfsprogs 1.8.2 added support for FreeBSD. I tested it. The good news, all
> regression tests passed (mostly just resizing related). The bad one is,
> there were a lot of scary and bogus outputs in regards to printed numbers
> (sizes, offsets, run lengths, etc) like relocating data to the bootsector,
> etc, those kind that should never happen.
>
> The reason is, the printf 'L' length modifier is incorrectly used in 436
> places all over the source instead of using 'll'. This is a very
> embarrassing and bad bug. Depending on the libc used and its current
> printf implementation, the numbers can be random thus it can be impossible
> to debug things and if an external tool relies on them then very
> unpleasant things could happen.
>
> Interestingly this never showed up on Linux for me, actually the compiler
> should have even warned :(
On Linux L is accepted to be the same as ll. At least it is in the
kernel. This is why I was using L and not ll... That is what I read one
should use. Obviously the person who wrote that wasn't aware of the
difference. I just did a "man 3 printf" and you are quite right. L is for
long double while ll is for long long (unsigned) int which is what we
should be using!
> Bzip2 compressed patch is attached.
Thanks, will apply either later today or tomorrow. At the moment my
workstation is in a state of limbo as I am migrating from RedHat 9.0 to
SuSE 9.0...
I will then release 1.8.3 or whatever we are at now immediately.
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
|