From 553acb7b6b8d4f16a4747b1f978e8b7888fbfb2c Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 1 Dec 2014 20:43:19 -0500 Subject: treewide: sanitize loop_write loop_write() didn't follow the usual systemd rules and returned status partially in errno and required extensive checks from callers. Some of the callers dealt with this properly, but many did not, treating partial writes as successful. Simplify things by conforming to usual rules. --- src/shared/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shared/util.h') diff --git a/src/shared/util.h b/src/shared/util.h index 61094cca2f..73bd9012fd 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -425,7 +425,7 @@ int sigaction_many(const struct sigaction *sa, ...); int fopen_temporary(const char *path, FILE **_f, char **_temp_path); ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll); -ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll); +int loop_write(int fd, const void *buf, size_t nbytes, bool do_poll); bool is_device_path(const char *path); -- cgit v1.2.3-54-g00ecf