From 27747f4a66fb884d4dbe2a938febf680a01f21aa Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 16 Sep 2005 09:35:47 +0000 Subject: (main): When failing to truncate, mention both the seek block count and the block size, in case the block size is very large. --- src/dd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/dd.c b/src/dd.c index 2b99f76b5..c47249abb 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) { -- cgit v1.2.3-70-g09d2