[Toybox] Do you suppose this du -b patch is worth it?

Rob Landley rob at landley.net
Wed Dec 11 11:44:51 PST 2019



On 12/10/19 6:47 PM, enh wrote:
> if i saw someone trying to use that, i'd assume that they were digging
> themselves into an unnecessary hole... in fact, the only time i
> remember seeing anyone try to use --apparent-size we talked them out
> of it.
> 
> that said --- du tests that used --apparent-size would probably work
> on all kinds of filesystems that the current tests don't work on.

$ stat -c%s toys.h
3440

> (so
> maybe implementing --apparent-size and -B# wouldn't be so silly, and
> then -b could just turn those on?)

"Is this one simple option worth it?"

"You could add two more options to justify this one."

I'll take that as a no.

> i'm assuming the busybox request didn't come with a convincing use case?

No, but I was using it as an indicator that somebody somewhere missed its absence.

> (there are still Android devices with *only* 32-bit userspace.
> everything low-end is that, even though there are no 32-bit SoCs, and
> afaik everyone's using a 64-bit *kernel* at least.)

Indeed. The x32 target was created because smaller pointer sizes mean less stack
space and better CPU cache and memory bus bandwidth utilization.

And in the embedded space, 32 bits is often a luxury. (One of our taglines for
j-core is "32 bits for the price of 8", although "price" here is circuitry size
in your design. We'd need waaaaaaay more volume to get the costs down to "3 cent
chip" territory.)

Rob



More information about the Toybox mailing list