From: Heiko Carstens <heiko.carstens@de.ibm.com>
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 <heiko.carstens@de.ibm.com>
#include <stdio.h>
#include <errno.h>
+#include "writeall.h"
#include "cpuset.h"
#include "path.h"
#include "nls.h"
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;
}