1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-21 23:18:00 -08:00
openbsd-src/bin/dd
florian ba080721f3 Rewrite bytes/sec calculation using fixed point math.
This makes signal handler safe on OpenBSD.

To avoid overflows the accuracy is scaled. Above 10 minutes run time
we only care about second accuracy. Between 1 seconds and 10 minutes
we use millisecond accuracy.

Below one second we use nanoseconds, but those numbers are probably
meaningless.

Signal handler problem pointed out by deraadt

OK deraadt, millert, tb
2024-07-12 19:11:25 +00:00
..
args.c Implement the conv=fsync feature which does an fsync(2) after the 2019-02-16 10:54:00 +00:00
conv_tab.c The "old" conversions are not mandated by any standard and are 2014-03-27 15:32:13 +00:00
conv.c Nuke a bunch of whitespace nits seen while '%q' hunting. 2016-08-16 16:44:55 +00:00
dd.1 replace the "write a floppy image" example with a more up to date one; 2020-10-29 07:01:24 +00:00
dd.c refactor the signal handlers for clarity, inverting the situation: 2024-07-12 14:30:27 +00:00
dd.h Implement the conv=fsync feature which does an fsync(2) after the 2019-02-16 10:54:00 +00:00
extern.h refactor the signal handlers for clarity, inverting the situation: 2024-07-12 14:30:27 +00:00
Makefile
misc.c Rewrite bytes/sec calculation using fixed point math. 2024-07-12 19:11:25 +00:00
position.c refactor the signal handlers for clarity, inverting the situation: 2024-07-12 14:30:27 +00:00