From: Sergey Poznyakoff Date: Thu, 10 Nov 2005 12:59:13 +0000 (+0000) Subject: (sparse_dump_region): Call mv_size_left. X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=9a42d945430a9bf27b9c3824228531fe9e475a40;p=chaz%2Ftar (sparse_dump_region): Call mv_size_left. (sparse_dump_file): Enclose the loop in mv_begin/mv_end. --- diff --git a/src/sparse.c b/src/sparse.c index 011fccd..30bf031 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -324,6 +324,7 @@ sparse_dump_region (struct tar_sparse_file *file, size_t i) memset (blk->buffer + bytes_read, 0, BLOCKSIZE - bytes_read); bytes_left -= bytes_read; file->dumped_size += bytes_read; + mv_size_left (file->stat_info->archive_file_size - file->dumped_size); set_next_block_after (blk); } @@ -397,8 +398,10 @@ sparse_dump_file (int fd, struct tar_stat_info *st) { size_t i; + mv_begin (file.stat_info); for (i = 0; rc && i < file.stat_info->sparse_map_avail; i++) rc = tar_sparse_dump_region (&file, i); + mv_end (); } }