X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbuffer.c;h=79bb7d6f4d45a6e1b724cf1fa5382838ea84203f;hb=57bfbbde90dfcc18ee6b1e27c01ba915ecc56312;hp=c544ee00d85b5b9a862035dadbce8636f57f52c5;hpb=7b69ee5a240bf25a7b65e7724248f2dd3f7e4836;p=chaz%2Ftar diff --git a/src/buffer.c b/src/buffer.c index c544ee0..79bb7d6 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -686,6 +686,18 @@ short_read (size_t status) more = record_start->buffer + status; left = record_size - status; + if (left && left % BLOCKSIZE == 0 + && !read_full_records && verbose_option > 1 + && record_start_block == 0 && status != 0) + { + unsigned long rsize = status / BLOCKSIZE; + WARN ((0, 0, + ngettext ("Record size = %lu block", + "Record size = %lu blocks", + rsize), + rsize)); + } + while (left % BLOCKSIZE != 0 || (left && status && read_full_records)) { @@ -707,26 +719,10 @@ short_read (size_t status) rest)); } - /* User warned us about this. Fix up. */ - left -= status; more += status; } - /* FIXME: for size=0, multi-volume support. On the first record, warn - about the problem. */ - - if (!read_full_records && verbose_option > 1 - && record_start_block == 0 && status != 0) - { - unsigned long rsize = (record_size - left) / BLOCKSIZE; - WARN ((0, 0, - ngettext ("Record size = %lu block", - "Record size = %lu blocks", - rsize), - rsize)); - } - record_end = record_start + (record_size - left) / BLOCKSIZE; records_read++; }