summaryrefslogtreecommitdiff
path: root/bin/dd
AgeCommit message (Collapse)Author
2022-01-14update header too.christos
2022-01-14The "ibm" and "oldibm" tables are identical, because POSIX justchristos
standardised the table from V7. Nobody, including the original authors, seems to have noticed this. Merge them and update the documentation. Also fix the odd, inconsistent, spelling of "pre-4.3BSD-Reno"). (From nabijaczleweli)
2021-10-09dd: fix lint warnings about effectively discarding 'const'rillig
args.c(153): warning: call to 'bsearch' effectively discards 'const' from argument [346] args.c(383): dito args.c(475): dito No functional change.
2021-10-09dd: clean up function summaryrillig
No functional change. Ideally the binary would have stayed the same, but GCC 10.3.0 inserts a nop and reorders the code.
2021-10-09dd: fix lint error about 'return expr' from void functionrillig
No change to the resulting binary. The 'return' statements are necessary for GCC to generate the exact same object code, even though they can be removed without affecting the functionality, as seen before the 'else'.
2021-10-08PR/56443: RVP: dd conv=swab doesn't always workchristos
2021-09-10bin: remove unnecessary lint comment CONSTCONDrillig
Since 2021-01-31, lint no longer warns about 'do ... while (0)'. No functional change.
2021-05-18dd.1: add an example of writing a NetBSD imagenia
2019-10-04copy libc's swab.c into dd as dd_swab(), and remove the restrict.mrg
our implementation was fine, but the restrict marker is problematic as gcc 8 is now more strict about checking for restrict issues. this is the only actual consumer of swab(3) in our tree, though, besides the test for it. oh well.
2019-09-15Drop -D_INCOMPLETE_XOPEN_C063 from dd(1)kamil
2019-03-23When buffers are at least page sized, explicitely request page alignment.mlelstv
2019-01-30Fix typos; use American spelling consistently. Remove an unnecessary macro.wiz
2019-01-30adjust the open flags available for dd to match actual realitymrg
of what matters. remove "search" for now, since O_SEARCH has no backend. document them all.
2017-07-04Use Ex.wiz
2017-07-03Remove workaround for ancient HTML generation code.wiz
2016-09-05Drop main() prototype.sevan
2016-08-18bump datesevan
2016-08-18dd first appeared in V5, not V1sevan
Heads up by Ingo Schwarze http://www.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c
2016-08-11Document the version dd first appeared.sevan
Bump date.
2016-08-11Pp not required before Bd, picked up by mandoc lintsevan
2016-08-11The macro to cross-reference is Xr, not Xt.sevan
Fix typo error picked up by mandoc lint.
2015-03-18New sentence, new line. Fix typos. Bump date for previous.wiz
2015-03-18Add iflag and oflag operands to dd(1)manu
Like GNU dd(1) similar operands, iflag and oflag allow specifying the O_* flags given to open(2) for the input and the output file. The values are comma-sepratated, lower-case, O_ prefix-stripped constants documented in open(2). Since iflag and oflag override default values, specifying oflag means O_CREATE is not set by default and must be specified explicitely. Some values do not make sense (e.g.: iflag=directory) but are still used and will raise a warning. For oflag, values rdonly, rdwr and wronly are filtered out with a warning (dd(1) attempts open(2) with O_RDWR and then O_WRONLY on failure). Specifying oflag=trunc along with (seek, oseek or conv=notrunc) is contradictory and will raise an error. iflag and oflag are disabled if building with -DMALLPROG
2013-07-17PR/48057: psi: skip and msgfmt cannot be used together. Looks like a pasto;christos
fixed.
2012-08-08let the standard rules deal with librumpclientchristos
2012-06-20- sync `SYNOPSIS' with dd.c's `usage' line;wiz
- correct spelling (prepositions). From Bug Hunting.
2012-02-21Fix a very old bug. When allocating the buffer and doing just a bs= transfer,matt
hen we only need a single buffer equal to that blocksize in length.
2011-11-07As suggested by Enami, rework the msgfmt logic a bit:jym
- error out when an unknown specifier is used. Do this in f_msgfmt(), before dd(1) starts operation. - allow buffer_write() to flush the internal buffer even when NULL is passed as parameter. Some whitespace fixes too.
2011-11-06Add a new command to dd(1): msgfmt. The command modifies thejym
output of the information summary returned by dd(1). This can be used to specify messages in a more usable (or parseable) format like human-readable values. My intent is to re-use this for building image files and quick I/O benchmarking. Reviewed by tsutsui@ on tech-userlevel. See also http://mail-index.netbsd.org/tech-userlevel/2010/12/03/msg004179.html Some examples: $ dd if=/dev/zero of=/dev/null bs=1m count=1 msgfmt=human 1+0 records in 1+0 records out 1048576 bytes (1,0 MB) transferred in 0.001 secs (1048576000 bytes/sec - 1,0 GB/sec) $ dd if=/dev/zero of=/dev/null count=1 msgfmt=' > <speed>%E</speed> > <time>%s</time> > <bytes>%b</bytes> > ' <speed>500 KB/sec</speed> <time>0.001</time> <bytes>512</bytes>
2011-09-16Use __dead for the small build toojoerg
2011-08-29Use __deadjoerg
2011-02-04Remove the rif/rof options and add rump.dd. This makes usagepooka
consistent with other rump clients. Copying between kernels is done using the host pipe, e.g.: dd if=foo rof=bar skip=1 seek=1 => dd if=foo skip=1 | rump.dd of=bar seek=1 Also, the pipe idiom extends to copying between different rump kernels, e.g.: env RUMP_SERVER=unix://srv1 rump.dd if=thefile \ | env RUMP_SERVER=unix://srv2 rump.dd of=thefile Pipe approach suggested by yamt (thanks!)
2011-01-13No need to cast with bsearch(), it returns a void *. Use __arraycount().jym
2010-12-23Fix speling ("deferred," not "defered") as reported in #netbsd-code onriz
freenode IRC. While I'm here, clean up the wording later in the comment.
2010-12-22Add iseek and oseek option as aliases for skip and seek respectively.enami
These options exist in dd of solaris or svr3. From FreeBSD.
2010-12-22Copy argument before modifying it so that ps shows entire argument.enami
From OpenBSD via FreeBSD.
2010-12-14remove some leftover development garbagepooka
2010-12-14Make compile on non-NetBSD.pooka
2010-12-09Wrap long line.enami
2010-12-06Fix most inopportune typo. from gson & jmmv.pooka
2010-12-05Hmm, for 'rof', I believe that C_ROF|C_OF is invalid rather thanjym
C_ROF|C_ROF. Hi pooka :)
2010-11-22extra crunchgen hoopspooka
2010-11-22Add two new operands: "rif" and "rof". They operate exactly likepooka
"if" and "of" with the exception that the communicate with a rump kernel instead of the host kernel. For example, to write stdout to /tmp/file.txt in a rump kernel namespace: dd rof=/tmp/file.txt copy /file1 to /file2 inside a rump kernel: dd rif=/file1 rof=/file2 copy a snippet from /dev/rmd0d on the rump kernel to the host fs: dd rif=/dev/rmd0d of=save seek=1000 count=3 Eat that, usermode OS. (I'll document the operands one I have some manpage to refer to for rump client use).
2009-03-11Don't workaround macro argument limit in ancient troff.joerg
2009-02-14fix -Wsign-compare issueslukem
2008-07-20Remove the \n and tabs from the __COPYRIGHT() strings.lukem
2008-05-26PR/38755: murray armfield: /bin posix programs missing setprogname and/orchristos
setlocale
2007-10-05Convert to using raise_default_signal(3).lukem
2007-07-03In the SIGINT handler, explicitly display a summary and then raise thelukem
default SIGINT handler to exit, rather than exit(0) and relying upon the atexit() to display the summary. Per SUS6.
2007-04-29fix typosmsaitoh