Files
makronix/mobile/docs
lotherkandClaude Opus 5.5 cc4c76c10f Makronix/Linux: df by the normal build; NetBSD's statvfs over statfs and mountinfo
libmxlinux carries NetBSD's statvfs(2) family -- statvfs, fstatvfs,
statvfs1, fstatvfs1, getvfsstat, getmntinfo -- for a Linux kernel: the
numbers from statfs(2), the names NetBSD keeps in its mount structure
(f_fstypename, f_mntonname, f_mntfromname) from /proc/self/mountinfo,
matched exactly by statx(2)'s STATX_MNT_ID.  Linux ST_* flags become
MNT_*; MNT_LOCAL unless the type is a network file system, MNT_ROOTFS
for "/", MNT_IGNORE for mounts without blocks (proc, sysfs, cgroup ...),
which NetBSD's df would otherwise list.

Headers, reached over: <sys/statvfs.h> in front of glibc's (NetBSD's
struct; its functions are renamed __statvfs90 ..., so they never meet
glibc's), <sys/fstypes.h> with NetBSD's fsid_t renamed in place (it is
not glibc's struct), a <machine/ansi.h> that needs nothing on glibc, and
a <sys/mount.h> that keeps glibc's underneath (#include_next) and adds
fstypes, statvfs and MNAMELEN (mount.h:63) as NetBSD's does.

Measured under qemu-aarch64: df -h lists the host's mounts with the
numbers GNU df gives for /, /boot, /boot/efi, /run; -i, -l, -k work.
(/dev and /tmp show the root's numbers there because qemu's -L redirects
those paths into the sysroot's own directories.)  28 of 34 programs of
src/bin build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 08:53:53 +00:00
..