[Aboriginal] uClibc- statfs() does not populate the `f_frsize' field of `struct statfs'

Rajeev V. Pillai rajeev_v_pillai at yahoo.com
Thu Dec 27 13:03:32 PST 2012

> From: Rob Landley <rob at landley.net>
> On which architecture?

ARM Tegra 2 tablet (armv7-a) running Android 2.3.5.

> Right, I can copy one more field in this pointless data marshalling wrapper.
> (Long-term: migrating to musl.) In the meantime, something like the attached?
Yeah. Either that or zero it out as the statfs() manpage says should be done.
BTW, musl has a similar data marshalling wrapper.

> (What's your use case, by the way? What package did this break?)
None, except my version of df(1) which I wrote to test my own *mntent() functions
(missing in Android's Bionic libc).

I wanted to use the POSIX statvfs(3) whose man page states that the various
block-related statistics were in units of `f_frsize' rather than `f_bsize'. But,
since Android's Bionic doesn't have statvfs(3), but, has statfs(2), I decided to
go with that latter. However, my manpage of statfs(2) doesn't make clear
whether the units reported are by statfs() are in `f_frsize' or `f_bsize'. I decided
to go with `f_frsize' given that `f_bsize' is officially the ``optimal transfer block size''.

I noticed that both busybox and toybox use `f_bsize', however--which doesn't
make much difference on most (ie. all those not implementing block fragments)
filesystems, though.


More information about the Aboriginal mailing list