[Toybox] [PATCH] Add "df -i".

Rob Landley rob at landley.net
Fri Nov 17 08:39:13 PST 2017


On 11/15/2017 03:11 PM, enh wrote:
> Also switch to u64 for calculations. Some FUSE file systems have inode
> counts large enough to overflow s64.

1<<63 = 9,223,372,036,854,775,808 = 9.2 quintillion.

That's kind of disturbing. (What does the filesystem have 9.2
quintillion _of_?)

Are we going to have a serious need for 128 bit numbers soon? If so,
where does "long long" move to? LP64 only guarantees it's at _least_ 64
bits...

Patch applied. The first [-blah] in the usage line collates the short
options without arguments and -i takes no argument so I'm collating it.
And using a ? : operator on the two printf() strings with the same
arguments.

Why are you going out of your way to force block to be signed? (Can the
number of blocks be negative? Percent is an unsigned long long for a
1-100 range because that way there's one list of variable declarations,
might as well throw block in there. And you left percent as %lld instead
of %llu while changing the type, not that it matters but as long as I'm
there...)

Rob



More information about the Toybox mailing list