commit | 277e4dfc0cf5de692bcae94be71efc3c8adef5ac | [log] [tgz] |
---|---|---|
author | Alexander Dahl <ada@thorsis.com> | Fri Apr 20 15:29:30 2018 +0200 |
committer | Tom Rini <trini@konsulko.com> | Sat Apr 28 18:32:24 2018 -0400 |
tree | 51b991b8fd3be1921711e191b2217ebd254af3df | |
parent | 75f2c869e17d7e0c128fef4bb948b8e4ffdcce08 [diff] |
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: Alexander Dahl <ada@thorsis.com>