From: uid65697 Date: Thu, 25 Dec 2003 10:18:14 +0000 (+0000) Subject: (short_read): Issue a warning on short reads. X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=278a8945a668348b1e0b31b6ee7c718909db20b2;p=chaz%2Ftar (short_read): Issue a warning on short reads. --- diff --git a/src/buffer.c b/src/buffer.c index b735dca..515c3b9 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -623,8 +623,15 @@ short_read (ssize_t status) archive_read_error (); if (status == 0) - break; - + { + char buf[UINTMAX_STRSIZE_BOUND]; + + WARN((0, 0, _("Read %s bytes from %s"), + STRINGIFY_BIGINT (record_size - left, buf), + *archive_name_cursor)); + break; + } + if (! read_full_records_option) { unsigned long rest = record_size - left;