]> git.ipfire.org Git - thirdparty/coreutils.git/commit
dd: work around Linux kernel CLOCK_MONOTONIC bug
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 20 Jun 2026 19:14:55 +0000 (12:14 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 20 Jun 2026 19:20:33 +0000 (12:20 -0700)
commit2e7707c23e1a05d12dbe41676b3759ef4f74a812
tree4ead4d0a52cc28facf4da8bbc5755b5a252087b0
parent6a850b9aacf82d83a46cd9a7fa551df834ab0b64
dd: work around Linux kernel CLOCK_MONOTONIC bug

Problem reported by Sick Pigs (bug#81269).
Ordinarily we’d say “fix the kernel or the hardware”,
but this bug seems widespread and unlikely to be fixed any time soon,
and the workaround is not a lot of trouble.
* src/dd.c (real_start_time): New static var.
(getrealxtime): New static function.
(print_xfer_stats): Use the max of elapsed monotonic and elapsed
real time.
NEWS
src/dd.c