DragonFly commits List (threaded) for 2008-08
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: cvs commit: src/usr.bin/du Makefile du.c
On Mon, Aug 04, 2008 at 12:22:44PM -0700, Sascha Wildner wrote:
> swildner 2008/08/04 12:22:44 PDT
>
> DragonFly src repository
>
> Modified files:
> usr.bin/du Makefile du.c
> Log:
> Use libutil's humanize_number(3) for -h.
>
> Submitted-by: Samuel J. Greear <sjg@evilcode.net>
> Taken-from: FreeBSD
>
> Revision Changes Path
> 1.5 +2 -2 src/usr.bin/du/Makefile
> 1.11 +9 -67 src/usr.bin/du/du.c
>
>
> http://www.dragonflybsd.org/cvsweb/src/usr.bin/du/Makefile.diff?r1=1.4&r2=1.5&f=u
> http://www.dragonflybsd.org/cvsweb/src/usr.bin/du/du.c.diff?r1=1.10&r2=1.11&f=u
I think our humanize_number() implementation is broken;
$ export BLOCKSIZE=k
$ du -s /usr/src/.
717155 /usr/src/.
$ du -hs /usr/src/.
/usr/src/.
If I enlarge the size of buf[] in prthumanval() from 4 to 8, it displays
something weird(correct, but isn't it supposed to be something like 717M?).
$ du -hs /usr/src/.
717155K /usr/src/.
Cheers.
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]