summaryrefslogtreecommitdiffstats
path: root/bin/dd
Commit message (Collapse)AuthorAgeFilesLines
* Explicitly add unmarked bin/ binaries to the runtime package.gjb2016-02-091-0/+1
| | | | | | | | Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation
* MFHgjb2016-02-082-50/+47
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * Add 't' and 'p' postfixes to dd(1).trasz2016-02-042-2/+13
| | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
| * Reduce code duplication.trasz2016-02-041-48/+34
| | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* | First pass to fix the 'tests' packages.gjb2016-02-021-0/+4
|/ | | | Sponsored by: The FreeBSD Foundation
* Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite asngie2015-10-182-0/+13
|\ | | | | | | | | | | | | | | | | | | bin/dd/tests Ensure fdescfs is mounted on /dev/fd/ for the length testcase as it's used in validating the characters read from /dev/zero MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
| * Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite as ↵ngie2015-10-182-0/+13
|/ | | | bin/dd/tests
* Mention the dd-like recoverdisk(1) to help folks find this great BSD command.obrien2015-07-161-0/+1
|
* Add META_MODE support.sjg2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge from head@274682sjg2014-11-191-1/+6
| |\ | |/ |/|
| * Updated dependenciessjg2014-05-161-1/+0
| |
| * Updated dependenciessjg2014-05-101-0/+2
| |
| * Merge from headsjg2014-05-084-38/+62
| |\
| * \ Merge headsjg2014-04-284-32/+67
| |\ \
| * \ \ Merge head@256284sjg2013-10-131-3/+3
| |\ \ \
| * \ \ \ Merge from headsjg2013-09-056-21/+23
| |\ \ \ \
| * \ \ \ \ sync from headsjg2013-04-121-0/+7
| |\ \ \ \ \
| * | | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | | |
| * | | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | | |
| | | | | | |
| | \ \ \ \ \
| *-. \ \ \ \ \ Sync from headsjg2012-11-043-3/+8
| |\ \ \ \ \ \ \
| * | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+19
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | bin/dd: revert 273734, as it fails on 32bit platformspi2014-10-275-46/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert: insufficient testing on 32bit platforms PR: 191263
* | | | | | | | bin/dd: Fix incorrect casting of argumentspi2014-10-275-54/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dd(1) casts many of its numeric arguments from uintmax_t to intmax_t and back again to detect whether or not the original arguments were negative. This caused wrong behaviour in some boundary cases: $ dd if=/dev/zero of=/dev/null count=18446744073709551615 dd: count cannot be negative After the fix: $ dd if=/dev/zero of=/dev/null count=18446744073709551615 dd: count: Result too large PR: 191263 Submitted by: will@worrbase.com Approved by: cognet@
* | | | | | | | Update the date for last example.imp2014-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: Netflix
* | | | | | | | Add canonical population of a disk / thumb drive from an imageimp2014-08-281-0/+5
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | example.
* | | | | | | Incorporate feedback from bde and jilles regarding r265472 to dd(1).asomers2014-05-083-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't use sysexits.h. Just exit 1 on error and 0 otherwise. * Don't sacrifice precision by converting the output of clock_gettime() to a double and then comparing the results. Instead, subtract the values of the two clock_gettime() calls, then convert to double. * Don't use CLOCK_MONOTONIC_PRECISE. It's an unportable synonym for CLOCK_MONOTONIC. * Use more appropriate names for some local variables. * In the summary message, round elapsed time to the nearest microsecond. Reported by: bde, jilles MFC after: 3 days X-MFC-With: 265472
* | | | | | | (dd_out): Fix handling of all-zeroes block at end of input withthomas2014-05-071-24/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conv=sparse. This change fixes two separate issues observed when the last output block is all zeroes, and conv=sparse is in use. In this case, care must be taken to roll back the last seek and write the entire last zero block at the original offset where it should have occurred: when the destination file is a block device, it is not possible to roll back by just one character as the write would then not be properly aligned. Furthermore, the buffer used to write this last all-zeroes block needs to be properly zeroed-out. This was not the case previously, resulting in a junk data byte appearing instead of a zero in the output stream. PR: bin/189174 PR: bin/189284 Reviewed by: kib MFC after: 2 weeks
* | | | | | | dd(1) uses gettimeofday(2) to compute the throughput statistics. However,asomers2014-05-062-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gettimeofday returns the system clock, which may jump forward or back, especially if NTP is in use. If the time jumps backwards, then dd will see negative elapsed time, round it up to 1usec, and print an absurdly fast transfer rate. The solution is to use clock_gettime(2) with CLOCK_MONOTONIC_PRECISE as the clock_id. That clock advances steadily, regardless of changes to the system clock. Reviewed by: delphij MFC after: 3 days Sponsored by: Spectra Logic
* | | | | | | Minor comment fix: dbsz is the block size as set by bs/ibs/obs,thomas2014-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | not the size of the buffer.
* | | | | | | Minor comment fix.thomas2014-05-031-1/+1
| |_|_|_|_|/ |/| | | | |
* | | | | | Make C_* contants fit in 32 bits again by using 4 unused bits.delphij2014-04-033-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | Noticed by: bde
* | | | | | Implement GNU's extension of 'status' operand. The GNU syntax isdelphij2014-04-036-34/+69
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | borrowed where syntax status=noxfer means no transfer statistics and status=none means no status information at all. This feature is useful because the statistics information can sometimes be annoying, and redirecting stderr to /dev/null would mean error messages also gets silenced. Obtained from: OpenBSD MFC after: 2 weeks
* | | | | Sweep man pages replacing ad -> ada.pluknet2013-10-011-3/+3
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | Approved by: re (blackend) MFC after: 1 week X-MFC note: stable/9 only
* | | | Make dd's signal handler async safe.eadler2013-05-106-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: bin/75258 Submitted by: "Oleg V. Nauman" <oleg@reis.zp.ua> Arrival Date: Sun Dec 19 14:50:21 GMT 2004 Reviewed by: mjg, jhb Reviewed by: jilles (earlier version) MFC after: 1 week
* | | | Literally follow POSIX:kib2013-04-231-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the bs= expr operand is specified and no conversions other than sync, noerror, or notrunc are requested, the data returned from each input block shall be written as a separate output block. In particular, when both bs=size and conv=sparce were specified, the resulted file was fully filled, instead of sparce. PR: standards/177742 Submitted by: Matthew Rezny <mrezny@hexaneinc.com> MFC after: 2 weeks
* | | IFP4 change 222074.brooks2013-04-031-0/+7
| |/ |/| | | | | | | | | | | | | | | | | Introduce an explicit close of the output descriptor so that work done on close is accounted for in the summary output triggered at exit (implicit close()s occur after atexit() hooks). This is useful because some devices such as cfi(4) may perform signficant work after a close occurs (e.g. erasing and rewriting a block of flash).
* | More -Wmissing-variable-declarations fixes.ed2012-10-201-0/+5
| | | | | | | | | | | | | | | | | | | | In addition to adding missing `static' keywords: - bin/dd: Pull in `extern.h' to guarantee consistency with source file. - libexec/rpc.rusersd: Move shared globals into an extern.h. - libexec/talkd: Move `debug' and `hostname' into extern.h. - usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree. - usr.bin/m4: Move `end_result' into extern.h. - usr.sbin/services_mkdb: Move shared globals into an extern.h.
* | Rework all non-contributed files that use `struct timezone'.ed2012-09-012-3/+3
|/ | | | | | | | | | | | | | This structure is not part of POSIX. According to POSIX, gettimeofday() has the following prototype: int gettimeofday(struct timeval *restrict tp, void *restrict tzp); Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is not used). Remove dead error handling code. Also use NULL for a nul-pointer instead of integer 0. While there, change all pieces of code that only use tv_sec to use time(3), as this provides less overhead.
* Bump .Dd for r187609keramida2009-01-301-1/+1
|
* Add an example of using bs=2048 to duplicate data CD-ROMs.keramida2009-01-231-0/+5
| | | | | | | | | | | This should be a bit useful for users who look at the manpage and then try to copy data CD-ROM disks using dd. A lot of us know that bs=2048 is required, but it still manages to cause a bit of grief to those who haven't heard about it. PR: bin/130857 Submitted by: Tri Brotoharsono < mail at tribrotoharsono.net > MFC after: 3 days
* More inactive maintainers.markm2006-07-091-2/+0
|
* Spell "protections" correctly.keramida2005-07-281-1/+1
|
* Sort sections.ru2005-06-141-8/+8
| | | | Approved by: re (blanket)
* Document problems with writing to disks under GEOM.scottl2005-04-071-1/+10
|
* Add the new standard EXIT STATUS section where appropriate.ru2005-01-161-2/+2
| | | | Sort standard sections in the (documented) preferred order.
* /*- or .\"- or #- to begin license clauses.imp2005-01-102-1/+2
|
* Scheduled mdoc(7) sweep.ru2005-01-091-5/+8
|
* Add a "fillchar" command line argument to dd(1) that permits the userrwatson2004-08-155-2/+32
| | | | | | | to specify an alternative padding character when using a conversion mode, or when using noerror with sync and an input error occurs. This facilities reading old and error-prone media by allowing the user to more effectively mark error blocks in the output stream.
* Allow for capital letters as size suffixes.pjd2004-07-311-8/+20
| | | | | Inspired by: le Approved by: green (maintainer)
OpenPOWER on IntegriCloud