aboutsummaryrefslogtreecommitdiff
path: root/bin/dd
Commit message (Collapse)AuthorAgeFilesLines
...
* | Explicitly add unmarked bin/ binaries to the runtime package.Glen Barber2016-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 Notes: svn path=/projects/release-pkg/; revision=295439
* | MFHGlen Barber2016-02-082-50/+47
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295394
| * Add 't' and 'p' postfixes to dd(1).Edward Tomasz Napierala2016-02-042-2/+13
| | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=295261
| * Reduce code duplication.Edward Tomasz Napierala2016-02-041-48/+34
| | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=295260
* | First pass to fix the 'tests' packages.Glen Barber2016-02-021-0/+4
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite asEnji Cooper2015-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 Notes: svn path=/head/; revision=289487
* Mention the dd-like recoverdisk(1) to help folks find this great BSD command.David E. O'Brien2015-07-161-0/+1
| | | | Notes: svn path=/head/; revision=285645
* Add META_MODE support.Simon J. Gerraty2015-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 Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge from head@274682Simon J. Gerraty2014-11-191-1/+6
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=274683
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Merge from headSimon J. Gerraty2014-05-084-38/+62
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ Merge headSimon J. Gerraty2014-04-284-32/+67
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * \ \ Merge head@256284Simon J. Gerraty2013-10-131-3/+3
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256424
| * \ \ \ Merge from headSimon J. Gerraty2013-09-056-21/+23
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ \ \ sync from headSimon J. Gerraty2013-04-121-0/+7
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | | | Sync from headSimon J. Gerraty2012-11-043-3/+8
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | bin/dd: revert 273734, as it fails on 32bit platformsKurt Jaeger2014-10-275-46/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert: insufficient testing on 32bit platforms PR: 191263 Notes: svn path=/head/; revision=273743
* | | | | | | | bin/dd: Fix incorrect casting of argumentsKurt Jaeger2014-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@ Notes: svn path=/head/; revision=273734
* | | | | | | | Update the date for last example.Warner Losh2014-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=270831
* | | | | | | | Add canonical population of a disk / thumb drive from an imageWarner Losh2014-08-281-0/+5
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | example. Notes: svn path=/head/; revision=270771
* | | | | | | Incorporate feedback from bde and jilles regarding r265472 to dd(1).Alan Somers2014-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 Notes: svn path=/head/; revision=265698
* | | | | | | (dd_out): Fix handling of all-zeroes block at end of input withThomas Quinot2014-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 Notes: svn path=/head/; revision=265593
* | | | | | | dd(1) uses gettimeofday(2) to compute the throughput statistics. However,Alan Somers2014-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 Notes: svn path=/head/; revision=265472
* | | | | | | Minor comment fix: dbsz is the block size as set by bs/ibs/obs,Thomas Quinot2014-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not the size of the buffer. Notes: svn path=/head/; revision=265258
* | | | | | | Minor comment fix.Thomas Quinot2014-05-031-1/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=265257
* | | | | | Make C_* contants fit in 32 bits again by using 4 unused bits.Xin LI2014-04-033-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed by: bde Notes: svn path=/head/; revision=264067
* | | | | | Implement GNU's extension of 'status' operand. The GNU syntax isXin LI2014-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 Notes: svn path=/head/; revision=264059
* | | | | Sweep man pages replacing ad -> ada.Sergey Kandaurov2013-10-011-3/+3
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Approved by: re (blackend) MFC after: 1 week X-MFC note: stable/9 only Notes: svn path=/head/; revision=255977
* | | | Make dd's signal handler async safe.Eitan Adler2013-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 Notes: svn path=/head/; revision=250469
* | | | Literally follow POSIX:Konstantin Belousov2013-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 Notes: svn path=/head/; revision=249811
* | | IFP4 change 222074.Brooks Davis2013-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). Notes: svn path=/head/; revision=249063
* | More -Wmissing-variable-declarations fixes.Ed Schouten2012-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. Notes: svn path=/head/; revision=241777
* | Rework all non-contributed files that use `struct timezone'.Ed Schouten2012-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. Notes: svn path=/head/; revision=239991
* Bump .Dd for r187609Giorgos Keramidas2009-01-301-1/+1
| | | | Notes: svn path=/head/; revision=187922
* Add an example of using bs=2048 to duplicate data CD-ROMs.Giorgos Keramidas2009-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 Notes: svn path=/head/; revision=187609
* More inactive maintainers.Mark Murray2006-07-091-2/+0
| | | | Notes: svn path=/head/; revision=160218
* Spell "protections" correctly.Giorgos Keramidas2005-07-281-1/+1
| | | | Notes: svn path=/head/; revision=148490
* Sort sections.Ruslan Ermilov2005-06-141-8/+8
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=147363
* Document problems with writing to disks under GEOM.Scott Long2005-04-071-1/+10
| | | | Notes: svn path=/head/; revision=144758
* Add the new standard EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-161-2/+2
| | | | | | | Sort standard sections in the (documented) preferred order. Notes: svn path=/head/; revision=140353
* /*- or .\"- or #- to begin license clauses.Warner Losh2005-01-102-1/+2
| | | | Notes: svn path=/head/; revision=139969
* Scheduled mdoc(7) sweep.Ruslan Ermilov2005-01-091-5/+8
| | | | Notes: svn path=/head/; revision=139943
* Add a "fillchar" command line argument to dd(1) that permits the userRobert Watson2004-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. Notes: svn path=/head/; revision=133762
* Allow for capital letters as size suffixes.Pawel Jakub Dawidek2004-07-311-8/+20
| | | | | | | | Inspired by: le Approved by: green (maintainer) Notes: svn path=/head/; revision=132933
* Bump document date for the latest functional change.Ruslan Ermilov2004-05-161-6/+10
| | | | | | | Minor markup tweaks. Notes: svn path=/head/; revision=129295