summaryrefslogtreecommitdiff
path: root/src/dd.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-09-16 09:35:47 +0000
committerJim Meyering <jim@meyering.net>2005-09-16 09:35:47 +0000
commit27747f4a66fb884d4dbe2a938febf680a01f21aa (patch)
tree1805ff37215d4c48b97b9eb5fc8db86810a5b8d5 /src/dd.c
parent31fc497b9a96d6bec4a342f74c753d47929ae30f (diff)
downloadcoreutils-27747f4a66fb884d4dbe2a938febf680a01f21aa.tar.xz
(main): When failing to truncate, mention both the seek block count
and the block size, in case the block size is very large.
Diffstat (limited to 'src/dd.c')
-rw-r--r--src/dd.c6
1 files changed, 5 insertions, 1 deletions
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)
{