summaryrefslogtreecommitdiffstats
path: root/bin/dd
Commit message (Collapse)AuthorAgeFilesLines
* ssize_t is not required to be the same width as size_t by theru2003-03-151-4/+6
| | | | | | specs, so cast to intmax_t where appropriate. Pointed out by: bde
* Fixed (soon might be fatal) -Wformat warnings.ru2003-03-151-2/+2
|
* WARNS=4 fixes. This would be WARNS=9 if we were -std=99 instead ofmarkm2003-02-278-47/+50
| | | | | | -ansi, due to 'long long'. Reviewed by: green (slightly earlier version)
* Don't call DIOCWLABEL on disks, it is not implemented, and calling itphk2003-01-261-7/+1
| | | | like this negated any practical value of the feature.
* mdoc(7) police:ru2002-11-261-1/+1
| | | | | | | | Revert to using the .Tn POSIX and .Tn ANSI instead of \*[Px] and \*[Ai] strings; using these strings is unsafe in troff mode, as they include a change in a font size. Approved by: re
* Consistently use __FBSDIDobrien2002-06-306-12/+12
|
* 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
* mdoc(7) police: replace the XXX with the correct width.ru2002-05-291-2/+1
|
* Add semicolon to empty default case to silence warning.jedgar2002-05-111-0/+1
|
* Various mdoc fixes, including a change that corrects spacing askeramida2002-03-311-43/+53
| | | | | | | | described in PR docs/36461. PR: docs/36461 Noticed by: Gary W. Swearingen <swear@blarg.net> Submitted by: ru
* 1) Rev.1.35 of dd.c has a more serious regression. It backs out rev.1.31,markm2002-03-071-1/+2
| | | | | | | | thus breaking systems with unpolluted <sys/stat.h>'s. 2) Back out an initialisation of a variable in BSS. Reported by: bde (1), many(2)
* Fix warnings inspired by lint, a commercial lint and WARNS=4.markm2002-02-223-7/+3
|
* Correct a logic bug that snuck in and broke multiplication of off_ts.green2002-02-071-1/+1
|
* Lock down with WFORMAT=1 except those directories with unfixed warnings.kris2002-02-041-0/+1
| | | | Tested on i386 and alpha.
* o __P has been reovedimp2002-02-026-91/+68
| | | | | | | | | | | 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)
* Commit general cleanups (separate get_num() and get_off_t() functions togreen2002-01-253-59/+109
| | | | | debogosify some of the command-line string-number conversions into an unsigned and signed variant.)
* Default to WARNS=2. Binary builds that cannot handle this must explicitlyobrien2001-12-041-0/+1
| | | | | | set WARNS=0. Reviewed by: mike
* mdoc(7) police: utilize the new .Ex macro.ru2001-08-151-3/+1
|
* mdoc(7) police: s/BSD/.Bx/ where appropriate.ru2001-08-141-2/+6
|
* Use __unused for non-used variables.green2001-06-292-2/+2
| | | | 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
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-2/+2
|
* Allow negative seek offsets for files that can be seeked upon. Itgreen2000-10-222-2/+10
| | | | | makes dd(1) a more complete "filter", even if this functionality is limited to seekable streams.
* Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and therebywollman2000-10-101-0/+1
| | | | <time.h>).
* Make the comment regarding ftruncate() correct.green2000-07-201-2/+2
|
* Various cleanups are made to reduce warnings and make code prettier :)green2000-07-015-17/+29
| | | | | Also, check for ftruncate() return value and die on failure, but only try to ftruncate() when the file is a regular file.
* Fix ``dd if=/dev/zero of=/dev/daN'' on the Alpha by allowing the labelobrien2000-05-241-1/+8
| | | | | | to be overwritten. Submitted by: green
* After Bruce kindly explained the whole groff "sentence" idea to me, I'vegreen2000-03-011-2/+4
| | | | put the whitespace in the right place.
* Fix style bugs I introduced in the last revision.green2000-02-271-7/+7
| | | | Brucified by: bde
* Add iseek= and oseek= aliases for the preexisting skip= and seek=green2000-02-262-1/+13
| | | | | | | | | | | operands. Can _YOU_ tell skip= and seek= apart with 100% accuracy every time? This also seems to make us option-for-option compatible with the Solaris dd(1). Approved by: jkh Suggested by: peter
* Reflect that dd accepts octal and hexadecimal numbers (in addition to decimal).gsutter2000-02-181-1/+2
| | | | | PR: 16750 Submitted by: Giorgos Keramidas <keramida@ceid.upatras.gr>
* I've been Brucified! I did evil things with typedefs, but I'll do itgreen1999-12-081-4/+4
| | | | | | | the correct (but less aesthetic) way, now. New lesson: correctness and aestheticity may be mutually exclusive at times. Brucified by: bde
* Do proper constification in args.c. This shuts up -Wcast-qual (thanks,green1999-12-072-4/+8
| | | | | | | bfumerola for that pointer!) in GCC complaining about losing a const. While I'm here, might as well mark in the Makefile that I'm the ${MAINTAINER}. It seems like that's what everyone's doing these days.
* Nuke the FIODTYPE compatibility bits. It's time.green1999-10-031-3/+1
|
* Make count=0 set cpy_cnt to -1, which is slight overloading, but makesgreen1999-09-163-5/+18
| | | | | | what I was trying to do work much better (ie at all. I could have sworn it was working...) Fix a SEEK_SET to be SEEK_CUR, and make Bruce's lseek() test work correctly.
* Let count=-something fail, while count=0 may succeed, thus making dd(1)green1999-09-161-2/+2
| | | | | | | useful as a seeking-tool as well as its many other uses. Previously, dd(1) would succeed with count=0, but wouldn't get to the point that blocks were to be read/written. This is a more useful behavior, and this specific case doesn't seem to be handled by POSIX.
* Even more dd(1) cleanups! Thanks to Bruce for staying on my case untilgreen1999-09-136-37/+45
| | | | we're done (not yet!) :)
* ISDISK -> ISSEEKgreen1999-09-123-5/+5
| | | | Allow a device type of D_DISK or D_MEM to be ISSEEK.
* Even more cleanups to dd(1). This is probably the culmination of thegreen1999-09-127-120/+117
| | | | | | | | | | | | | BDEification process of dd(1). Most of the changes are from BDE's archive. Support for negative offsets is gone again, but the case where you lseek() onto byte -1 of something from a negative offset using seek/skip is fixed; if you end up on -1, you won't get a false positive lseek failure. The biggest changes are to data types (more size_t, for instance) and argument parsing. skip/seek on /dev/{,k}mem now occurs (instead of "read until you reach the offset") due to mem devices now being D_DISK. Some const things are now correctly declared as such, and the "case table" building is better. The only thing that seems to be left to make dd(1) everything TOG wants it to be is l10n.
* Make a bit more headway with dd's argument parsing, etc. get_bsz() isgreen1999-09-112-26/+32
| | | | | renamed get_num() since it's not just about block sizes. skip and seek can be any offset, including negative, now. Some style bogons are fixed.
* Relax things a bit. Not having FIODTYPE will be a warning for now.green1999-08-281-8/+12
| | | | | Pointy hat: green Pointed out by: peter
* $Id$ -> $FreeBSD$peter1999-08-2710-10/+10
|
* Use FIODTYPE to unbogosify much of the file type checking in dd.green1999-08-271-10/+15
|
* Implement seekability for disk devices (not just regular files).green1999-07-133-11/+13
| | | | | | Also, fix pos_out() to do the same checks pos_in() did. Done for: jdp, luigi, the good of the world
* This is the second round of dd(1) changes. Some changes made/reversed bygreen1999-06-207-83/+108
| | | | | | | | request of Bruce. More changes may follow later. 'g' multiplier has been added (i.e. dd seek=5g if=bigfile.) Some minor corrections were made as well. Noticed by: bde
* Miscellaneous dd(1) changes: mainly fixing variable types (size_t, ssize_t,green1999-06-197-105/+104
| | | | | off_t, int, u_int64_t, etc.). dd(1) should now work properly with REALLY big amounts of data.
* Various spelling/formatting changes.kris1999-05-082-5/+5
| | | | Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
* First set of fixes to keep egcs happy. These include {} around singleimp1999-04-251-5/+6
| | | | | | | | | | statement if blocks[*] when the else could be ambiguous, not defaulting to int type and removal of some unused variables. [*] This is explicitly allowed by style(9) when the single statement spans more than one line. Reviewed by: obrien, chuckr
OpenPOWER on IntegriCloud