mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
util/os_file: actually return the error read() gave us
Fixes:316964709e"util: add os_read_file() helper" Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit7e35f20d44)
This commit is contained in:
parent
3301eeee51
commit
c025240f6c
1 changed files with 3 additions and 1 deletions
|
|
@ -29,8 +29,10 @@ readN(int fd, char *buf, size_t len)
|
|||
if (ret == -EINTR || ret == -EAGAIN)
|
||||
continue;
|
||||
|
||||
if (ret <= 0)
|
||||
if (ret <= 0) {
|
||||
err = ret;
|
||||
break;
|
||||
}
|
||||
|
||||
total += ret;
|
||||
} while (total != len);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue