HomeFreeBSD

linux(4): Rework statfs conversion routine.

Description

linux(4): Rework statfs conversion routine.

Rework the routines to convert a native statfs structure (with fixed-size 64-bit
counters) to a Linux statfs structure (with long-sized counters) for 32-bit apps.

Instead of following Linux and return an EOVERFLOW error from statfs() family of
syscalls when actual fs stat value(s) are large enough to not fit into 32 bits,
apply scale logics used by FreeBSD to convert a 5.x statfs structure to a 4.x
statfs structure.

For more details see cc479dda.

Tested by: glebius
MFC after: 1 week

(cherry picked from commit 953688e823a67c3e9c0096252c33b1e7ecf9a095)

Details

Provenance
dchaginAuthored on Jan 28 2023, 10:19 AM
Parents
rGdbe8292614ba: bsd-family-tree: add DragonFly 6.4.0
Branches
Unknown
Tags
Unknown