]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Incorporate feedback from bde and jilles regarding r265472 to dd(1).
authorasomers <asomers@FreeBSD.org>
Thu, 8 May 2014 19:10:04 +0000 (19:10 +0000)
committerasomers <asomers@FreeBSD.org>
Thu, 8 May 2014 19:10:04 +0000 (19:10 +0000)
commit5bd695fd9651dd452406074cf2dbaa39e49ccba6
tree89c0164df08937129faf83adb970f8445406bbae
parentcf46da7b9b56863c03d08e14aa2ed5a575cb0462
Incorporate feedback from bde and jilles regarding r265472 to dd(1).

* Don't use sysexits.h.  Just exit 1 on error and 0 otherwise.
* Don't sacrifice precision by converting the output of clock_gettime() to a
  double and then comparing the results.  Instead, subtract the values of
  the two clock_gettime() calls, then convert to double.
* Don't use CLOCK_MONOTONIC_PRECISE.  It's an unportable synonym for
  CLOCK_MONOTONIC.
* Use more appropriate names for some local variables.
* In the summary message, round elapsed time to the nearest microsecond.

Reported by: bde, jilles
MFC after: 3 days
X-MFC-With: 265472
bin/dd/dd.c
bin/dd/dd.h
bin/dd/misc.c