- if (status != buffer_size)
- {
- char buf[UINTMAX_STRSIZE_BOUND];
- FATAL_ERROR ((0, 0, _("%s: File shrunk by %s bytes, (yark!)"),
- path, STRINGIFY_BIGINT (bytes_left, buf)));
+ status = safe_read (handle, start->buffer, buffer_size);
+ if (status < 0)
+ read_fatal_details (path, stat_data.st_size - bytes_left,
+ buffer_size);
+ if (status == 0)
+ FATAL_ERROR ((0, 0,
+ ngettext ("%s: File shrank by %s byte",
+ "%s: File shrank by %s bytes",
+ bytes_left),
+ quotearg_colon (path),
+ STRINGIFY_BIGINT (bytes_left, buf)));
+
+ bytes_left -= status;
+
+ set_next_block_after (start + (status - 1) / BLOCKSIZE);