mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(main): When failing to truncate, mention both the seek block count
and the block size, in case the block size is very large.
This commit is contained in:
1 parent
31fc497b9a
commit
27747f4a66
1 file changed
+5
-1
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user