projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8f222e
)
util/os_file: actually return the error read() gave us
author
Eric Engestrom
<eric.engestrom@intel.com>
Thu, 16 May 2019 13:57:07 +0000
(14:57 +0100)
committer
Eric Engestrom
<eric@engestrom.ch>
Sun, 9 Jun 2019 13:14:13 +0000
(13:14 +0000)
Fixes: 316964709e21286c2af5 "util: add os_read_file() helper"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/util/os_file.c
patch
|
blob
|
history
diff --git
a/src/util/os_file.c
b/src/util/os_file.c
index 246fd32fdf64408fe99627ca52729cf4ea9b6857..da17d12b50e5d67e5ea89a59da3397fa131f7214 100644
(file)
--- a/
src/util/os_file.c
+++ b/
src/util/os_file.c
@@
-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);