X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fsparse.c;h=8e5ad284c243b0afa515a48084911a42b18948af;hb=03858cf583ce299b836d8a848967ce290a6bf303;hp=4b2f982a8c58f5ebef2b0be28be3f6527a70c070;hpb=7a5a3708cb8b33494cd6ac64bfe163f631a33edf;p=chaz%2Ftar diff --git a/src/sparse.c b/src/sparse.c index 4b2f982..8e5ad28 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -230,7 +230,7 @@ sparse_scan_file (struct tar_sparse_file *file) if (!tar_sparse_scan (file, scan_begin, NULL)) return false; - while ((count = safe_read (fd, buffer, sizeof buffer)) != 0 + while ((count = blocking_read (fd, buffer, sizeof buffer)) != 0 && count != SAFE_READ_ERROR) { /* Analyze the block. */ @@ -360,7 +360,7 @@ sparse_extract_region (struct tar_sparse_file *file, size_t i) return false; } set_next_block_after (blk); - count = full_write (file->fd, blk->buffer, wrbytes); + count = blocking_write (file->fd, blk->buffer, wrbytes); write_size -= count; file->dumped_size += count; mv_size_left (file->stat_info->archive_file_size - file->dumped_size); @@ -991,7 +991,7 @@ pax_dump_header_1 (struct tar_sparse_file *file) off_t size = 0; struct sp_array *map = file->stat_info->sparse_map; char *save_file_name = file->stat_info->file_name; - + #define COPY_STRING(b,dst,src) do \ { \ char *endp = b->buffer + BLOCKSIZE; \