At least NFS does not fulfill read requests > 1024 bytes at once. Use read_full in read_file as read doesn't guarantee that the whole request can be read at once. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- fs/fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fs.c b/fs/fs.c index 7a57bc0..eed0fce 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -60,7 +60,8 @@ again: if (fd < 0) goto err_out; - if (read(fd, buf, s.st_size) < s.st_size) + ret = read_full(fd, buf, s.st_size); + if (ret < 0) goto err_out1; close(fd); -- 1.8.5.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox