open-power / skiboot

OPAL boot and runtime firmware for POWER
Apache License 2.0
98 stars 134 forks source link

collected mmap fixes #256

Closed oohal closed 4 years ago

oohal commented 4 years ago

The fixes to ffspart in #255 broke the tests for ffspart and pflash because both of them attempt to use /dev/zero and /dev/urandom as input files. The current implementation for ffspart uses the file size returned by stat() to determine the mmap() mapping length. However, the size is zero leading to mmap() failing with EINVAL. For dumb reasons the test still passed and the patch to add proper return code checking uncovered the breakage.

Good stuff all around IMO.

Includes the fixes from #252 and #255.