[Toybox] [PATCH] df: -a should even show mounts we couldn't stat.

Yi-yo Chiang yochiang at google.com
Fri Feb 12 23:55:17 PST 2021


Not related to your change, but I noticed we're using "statvfs.f_bsize" as
filesystem block size to calculate the used percentage. We should use
"statvfs.f_frsize" instead as that is the unit of "statvfs.f_blocks".

On Sat, Feb 13, 2021 at 9:37 AM enh via Toybox <toybox at lists.landley.net>
wrote:

> In xgetmountlist(), keep track of whether we could stat or not, so we
> can distinguish an actual device 0:0 from a failed stat/statvfs.
>
> Also switch to FLAG() and capitalize POSIX.
> ---
>  lib/lib.h         |  1 +
>  lib/portability.c | 12 ++++-------
>  toys/posix/df.c   | 55 ++++++++++++++++++++++++++++-------------------
>  3 files changed, 38 insertions(+), 30 deletions(-)
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net
>


-- 

Yi-yo Chiang
Software Engineer
yochiang at google.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210213/f25c6b43/attachment-0001.html>


More information about the Toybox mailing list