]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[linux] Use fstat() rather than statx()
authorMichael Brown <mcb30@ipxe.org>
Wed, 3 Mar 2021 00:34:02 +0000 (00:34 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 3 Mar 2021 01:01:58 +0000 (01:01 +0000)
commit69ecab2634d3f5a825e0baaa310ba048d5aed3b5
treee3a8a0415394c75e0ef679b83b4d7032f7df61fa
parent2a2909cd1f55b2110bf8ef48b65816c9fae4637f
[linux] Use fstat() rather than statx()

The statx() system call has a clean header file and a consistent
layout, but was unfortunately added only in kernel 4.11.

Using stat() or fstat() directly is extremely messy since glibc does
not necessarily use the kernel native data structures.  However, as
the only current use case is to obtain the length of an open file, we
can merely provide a wrapper that does precisely this.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/linux_api.h
src/interface/linux/linux_api.c
src/interface/linux/linux_sysfs.c