io-util: introduce loop_write_full that takes a timeout

Also drop do_poll as the use case is covered
by timeout.
This commit is contained in:
Mike Yuan
2023-09-07 20:30:44 +08:00
parent 82b7bf8c1c
commit e22c60a9d5
34 changed files with 103 additions and 81 deletions
+1 -1
View File
@@ -2478,7 +2478,7 @@ static int setup_credentials(const char *root) {
if (fd < 0)
return log_error_errno(errno, "Failed to create credential file %s: %m", j);
r = loop_write(fd, arg_credentials[i].data, arg_credentials[i].size, /* do_poll= */ false);
r = loop_write(fd, arg_credentials[i].data, arg_credentials[i].size);
if (r < 0)
return log_error_errno(r, "Failed to write credential to file %s: %m", j);