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@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@lists.landley.net > http://lists.landley.net/listinfo.cgi/toybox-landley.net > -- Yi-yo Chiang Software Engineer yochi...@google.com
_______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net