Skip to content
Commit f6e61643 authored by Adhemerval Zanella's avatar Adhemerval Zanella
Browse files

linux: Consolidate statfs implementations



The __NR_statfs64 syscall is supported on all architectures but
aarch64, mips64, riscv64, and x86_64.  And newer ABIs also uses
the new statfs64 interface (where the struct size is used as
second argument).

So the default implementation now uses:

  1. __NR_statfs64 for non-LFS call and handle overflow directly
     There is no need to handle __NR_statfs since all architectures
     that only support are LFS only.

  2. __NR_statfs if defined or __NR_statfs64 otherwise for LFS
     call.

Alpha is the only outlier, since it is a 64-bit architecture which
provides non-LFS interface and only provides __NR_statfs64 on
newer kernels (v5.1+).

Checked on x86_64-linux-gnu.

Reviewed-by: default avatarCarlos O'Donell <carlos@redhat.com>
parent 1bfbaf71
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment