From: Jim Meyering Date: Fri, 16 Sep 2005 09:35:47 +0000 (+0000) Subject: (main): When failing to truncate, mention both the seek block count X-Git-Tag: v5.90~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27747f4a66fb884d4dbe2a938febf680a01f21aa;p=thirdparty%2Fcoreutils.git (main): When failing to truncate, mention both the seek block count and the block size, in case the block size is very large. --- diff --git a/src/dd.c b/src/dd.c index 2b99f76b50..c47249abb1 100644 --- a/src/dd.c +++ b/src/dd.c @@ -1654,7 +1654,11 @@ main (int argc, char **argv) uintmax_t size = seek_records * output_blocksize; if (OFF_T_MAX / output_blocksize < seek_records) - error (EXIT_FAILURE, EOVERFLOW, "seek=%"PRIuMAX"", seek_records); + error (EXIT_FAILURE, 0, + _("offset too large: " + "cannot truncate to a length of seek=%"PRIuMAX"" + " (%lu-byte) blocks"), + seek_records, output_blocksize); if (ftruncate (STDOUT_FILENO, size) != 0) {