bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6417: [Bug 591969] Re: dd bs=3G || ubuntu-bug coreutils


From: Paul Eggert
Subject: bug#6417: [Bug 591969] Re: dd bs=3G || ubuntu-bug coreutils
Date: Mon, 14 Jun 2010 13:24:40 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4

On 06/13/2010 12:19 PM, Jim Meyering wrote:

> +  size_t sz = input_blocksize + INPUT_BLOCK_SLOP;
> +  real_buf = malloc (sz);
> +  if (!real_buf)
> +    error (EXIT_FAILURE, 0,
> +           _("failed to allocate an input buffer of size %s"),
> +           human_size (sz));

Wouldn't it be better to output the exact buffer size,
rather than an approximation?  Usually it's better to
output more information, rather than less, to help
debug problems more precisely.

One way to do this would be to output the same string
that the user specified: if the user says "bs=3EiB" then
output "3EiB" in the diagnostic.  That would be exact,
and would be a bit friendlier than "3458764513820540928 bytes".
Or, we could output both, as in "3EiB (3458764513820540928 bytes)",
where the first is the string and the second is the integer that
we converted it to.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]