diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-05-27 22:58:53 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-05-28 10:17:02 +0200 |
commit | 8f945131a18e68121f6e7ea4c12992a5eb108466 (patch) | |
tree | 4b3c2d72d5ce14da5ba7bb56ed5c07714ee5b01f /commands | |
parent | 6ce2ee8ce47afb21aaaa8cfee4fca744ebf520a9 (diff) | |
download | barebox-8f945131a18e68121f6e7ea4c12992a5eb108466.tar.gz barebox-8f945131a18e68121f6e7ea4c12992a5eb108466.tar.xz |
libfile: Do not return 0 from write_full()
None of the callers of write_full() expect a zero return value. Given
how the documentation explicitly states that either all of the buffer
is going to be written out or an error generated, treat 0 retrun from
write() as a error, set errno to ENOSPC and return -1.
Same logic applies to pwrite_full() as well, so make the change there
while at it.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
0 files changed, 0 insertions, 0 deletions