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> |
---|
|
lib/libfile.c |
---|