Commit 3559028c authored by Alexander Dahl's avatar Alexander Dahl Committed by Tom Rini
Browse files

tools: mkenvimage: Fix read() stdin error handling



On success read() returns the number of bytes read or zero for EOF. On
error -1 is returned and errno is set, so the right way to test if read
had failed is to test the return value instead of errno.

Signed-off-by: default avatarAlexander Dahl <ada@thorsis.com>
parent 8dc4e1fb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment