summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-14 00:49:06 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-14 00:49:06 +0200
commita1a3972f285a63501223f898360571cb7e7e6d26 (patch)
tree2b4303b7f5176963548685008dd8b21752dc0a8e
parent4e5b07b0fed4be34ab3b22666e2a68e7ec2738d8 (diff)
dd: add a comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/dd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 768a12995..f2e1a1683 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -73,9 +73,9 @@ static void dd_output_status(int UNUSED_PARAM cur_signal)
* (sleep 1; echo DONE) | ./busybox dd >/dev/null
*/
diff_us -= G.begin_time_us;
- /* We need to calculate "(total * 1M) / usec" without overflow.
+ /* We need to calculate "(total * 1000000) / usec" without overflow.
* this would work too, but is bigger than integer code below.
- * total = G.total_bytes * (double)(1024 * 1024) / (diff_us ? diff_us : 1);
+ * total = G.total_bytes * (double)1000000 / (diff_us ? diff_us : 1);
*/
diff_scaled = diff_us;
total = G.total_bytes;
@@ -83,7 +83,7 @@ static void dd_output_status(int UNUSED_PARAM cur_signal)
total >>= 1;
diff_scaled >>= 1;
}
- total *= (1024 * 1024);
+ total *= (1024 * 1024); /* should be 1000000, but it's +45 bytes */
if (diff_scaled > 1)
total /= diff_scaled;
fprintf(stderr, "%f seconds, %sB/s\n",