| 2377 | } |
| 2378 | |
| 2379 | static bool posix_fd_write_all(int fd, const uint8_t *buffer, size_t length) { |
| 2380 | size_t offset = 0; |
| 2381 | while (offset < length) { |
| 2382 | ssize_t written = write(fd, buffer + offset, length - offset); |
| 2383 | if (written > 0) { |
| 2384 | offset += (size_t)written; |
| 2385 | } else if (written < 0 && errno == EINTR) { |
| 2386 | continue; |
| 2387 | } else { |
| 2388 | return false; |
| 2389 | } |
| 2390 | } |
| 2391 | return true; |
| 2392 | } |
| 2393 | |
| 2394 | /* The failing step of the most recent record publication in this process: |
| 2395 | * its errno (0 when a validation predicate, not a syscall, refused) and the |
no test coverage detected