HomeFreeBSD

efivar: handle error when reading --fromfile

Description

efivar: handle error when reading --fromfile

The result of read() was stored in an unsigned variable, so the
test for a negative value would never work.

While I'm here, print a better error message for an empty file,
omitting the misleading errno message.

Reported by: Coverity
MFC after: 1 week
Sponsored by: Dell EMC Isilon

Details

Provenance
vangyzenAuthored on Feb 23 2022, 6:15 PM
Parents
rG331b84b5db11: rtsold: fix memory leak in script execution
Branches
Unknown
Tags
Unknown