From: Heiko Carstens Date: Fri, 16 Sep 2011 08:28:43 +0000 (+0200) Subject: lib,path: use write_all() X-Git-Tag: v2.21-rc1~394 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25dea0b56595d04d9ef9e1eb554b9047ef12dedd;p=thirdparty%2Futil-linux.git lib,path: use write_all() From: Heiko Carstens Since write() doesn't necessarily write the complete buffer with one call we better use write_all() which takes care of this. Signed-off-by: Heiko Carstens --- diff --git a/lib/path.c b/lib/path.c index e2bb398026..54b8942f45 100644 --- a/lib/path.c +++ b/lib/path.c @@ -27,6 +27,7 @@ #include #include +#include "writeall.h" #include "cpuset.h" #include "path.h" #include "nls.h" @@ -132,7 +133,7 @@ path_writestr(const char *str, const char *path, ...) va_start(ap, path); fd = path_vopen(O_WRONLY, path, ap); va_end(ap); - result = write(fd, str, strlen(str)); + result = write_all(fd, str, strlen(str)); close(fd); return result; }