[linux] Do not assume that stat() works on sysfs files master
authorMichael Brown <mcb30@ipxe.org>
Wed, 3 Mar 2021 02:24:32 +0000 (02:24 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 3 Mar 2021 02:26:42 +0000 (02:26 +0000)
commit65bd5c05db2a050a4c0f26ccc0b1e9828b00abbf
tree8b304e947b9960418ea95007de99ff157931f22b
parent1c4917b6a739c887acbf6f7631b1f74084430ee7
[linux] Do not assume that stat() works on sysfs files

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>
src/interface/linux/linux_sysfs.c