On 08/11/10 23:13, Pádraig Brady wrote: > On 08/11/10 20:37, Tim Spriggs wrote: >> Hello, >> >> I am running gentoo-prefix on OSX which builds coreutils. When I >> compare the output of the system df to the standard GNU df I get: >> >> >> $ /bin/df -h /data/hirise06 >> Filesystem Size Used Avail Capacity Mounted on >> hiserve2:/vol/hirise06 7.9Ti 430Gi 7.5Ti 6% /data/hirise06 >> >> $ df -h /data/hirise06 >> Filesystem Size Used Avail Use% Mounted on >> hiserve2:/vol/hirise06 >> 2.0T 431G -523G - /data/hirise06 >> >> The 2.0T size looks suspicious to me. Maybe an integer is overflowing >> somewhere? > > Well 2T is between 32 bit and 64 bit. > If I had to guess I'd say df was using a 32 bit statfs > that was returning 1024 blksize? > > Could you compare the system calls made by both versions of df. > On GNU/Linux I can trace the statfs calls like: > > strace -v -e statfs,statfs64 df /data/hirise06 > > If the trace for the above gives no output > for either command, then can you include the > full trace output.
Also could you give your exact version of OSX. I had a quick google for statfs64 and OSX and it seems that _DARWIN_USE_64_BIT_INODE needs to be defined (and your OSX version to support symbol variants). Could you try adding that as the first line in df.c? I.E. #define _DARWIN_USE_64_BIT_INODE 1 If that's the case, then it seems like the AC_SYS_LARGEFILE would need to be updated in autoconf to handle this. cheers, Pádraig.
