- buffer_size = bytes_left;
- status = buffer_size % BLOCKSIZE;
- if (status)
- memset (start->buffer + bytes_left, 0,
- (size_t) (BLOCKSIZE - status));
- }
-
- status = read (handle, start->buffer, (size_t) buffer_size);
- if (status < 0)
- FATAL_ERROR ((0, errno,
- _("Read error at byte %ld reading %d bytes in file %s"),
- stat_data.st_size - bytes_left, buffer_size, path));
- bytes_left -= status;
+ union block *start = find_next_block ();
+ size_t buffer_size = available_space_after (start);
+ size_t status;
+ char buf[UINTMAX_STRSIZE_BOUND];