| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | [linux] Do not assume that stat() works on sysfs files | Michael Brown | 2021-03-03 | 1 | -29/+20![]() |
| | | | | | | | | | Linux kernel 3.12 and earlier report a zero size via stat() for all ACPI table files in sysfs. There is no way to determine the file size other than by reading the file until EOF. Signed-off-by: Michael Brown <mcb30@ipxe.org> | ||||
| * | [linux] Use fstat() rather than statx() | Michael Brown | 2021-03-03 | 1 | -3/+1![]() |
| | | | | | | | | | | | | | 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> | ||||
| * | [linux] Add a generic function for reading files from sysfs | Michael Brown | 2021-03-03 | 1 | -0/+107 |
| Signed-off-by: Michael Brown <mcb30@ipxe.org> | |||||

