summaryrefslogtreecommitdiffstats
path: root/bin/dd/misc.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove clause 3 from the UCB licenses.markm2004-04-061-4/+0
| | | | OK'ed by: imp, core
* WARNS=4 fixes. This would be WARNS=9 if we were -std=99 instead ofmarkm2003-02-271-4/+5
| | | | | | -ansi, due to 'long long'. Reviewed by: green (slightly earlier version)
* Consistently use __FBSDIDobrien2002-06-301-2/+2
|
* Replace <strings.h> with <string.h>. No functions from the former arekeramida2002-06-091-1/+1
| | | | | | | used in this file, and strlen() needs to be prototyped by the latter, for this to compile without warnings. Reviewed by: mike
* o __P has been reovedimp2002-02-021-5/+3
| | | | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. Approved by: arch@, new style(9)
* Use __unused for non-used variables.green2001-06-291-1/+1
| | | | Submitted by: Mike Barcroft <mike@q9media.com>
* Previous commit broke dd(1)'s I/O summary when it's terminated by add2001-06-251-0/+1
| | | | | | | | | signal. Fix it by adding an explicit call to summary() in terminate() (it was previously called implicitly by exit() because summary() was registered with atexit()). summary() is supposed to be signal-safe-- it handles SIGINFO almost exclusively--so this should be safe. Submitted by: bde
* Don't call exit(3) from a signal handler.dd2001-06-241-2/+1
| | | | Obtained from: OpenBSD
* Add more headers that are required with -fno-builtin (stdlib and strings)des2001-06-191-0/+2
|
* $Id$ -> $FreeBSD$peter1999-08-271-1/+1
|
* Miscellaneous dd(1) changes: mainly fixing variable types (size_t, ssize_t,green1999-06-191-4/+4
| | | | | off_t, int, u_int64_t, etc.). dd(1) should now work properly with REALLY big amounts of data.
* Fixed printf format errors.bde1998-12-071-4/+4
|
* Restore Lite-2 sccsid. Restore include of sys/types.h.charnier1998-05-131-2/+3
|
* Correct use of .Nm and other cosmetics. Add rcsid. Remove unused #inc.charnier1998-05-061-7/+4
|
* Exit with a nonzero status if we get killed by a SIGINT. POSIX.2bde1998-02-241-4/+5
| | | | | | | | | specifies exiting with a zero status if the file was copied successfully, and with a nonzero status if an error occurred. We are too sloppy to tell if the file was copied successfully when we get killed by a SIGINT, but it is unlikely to have been. Added a comment about related sloppiness (calling exit() from a signal handler).
* Fix printing for bytes read > 4G.asami1998-02-111-2/+2
| | | | Reviewed by: bde
* It's more portable to use <errno.h> than <sys/errno.h>eivind1997-12-151-2/+2
| | | | Pointed-out-by: bde (a long while ago)
* Add <sys/errno.h>eivind1997-10-091-1/+2
|
* make signal handlers errno safeeivind1997-10-081-1/+3
| | | | Obtained from: OpenBSD (file rev 1.5) Theo de Raadt <deraadt@openbsd.org>
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* -Wall cleaning.steve1996-12-141-2/+2
|
* Bruce says: "You have been programming in the kernel for too long :-)."phk1996-11-131-25/+10
| | | | | | | | | | | | | | | | | and he's right ... I forgot about this floating point stuff you can use in user-land :-) Increase precision of duration to microseconds. No heuristics to avoid overflow in calculation needed - just depend on DBL_MAX being a bit larger than LONG_MAX. Use double instead of `struct timeval' in dd.h so that everything doesn't have to include <sys/time.h>. Fixed style bugs in recent and old FreeBSD changes. Reviewed by: phk Submitted by: bde
* Increase precision of duration to milliseconds.phk1996-11-121-8/+26
| | | | Some heuristics to avoid overflow in calculation attempted.
* Added $Id$dg1994-09-241-0/+2
|
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-261-0/+100
OpenPOWER on IntegriCloud