| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Revert: insufficient testing on 32bit platforms
PR: 191263
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Inspired by: le
Approved by: green (maintainer)
|
|
|
|
| |
OK'ed by: imp, core
|
| |
|
|
|
|
|
|
| |
specs, so cast to intmax_t where appropriate.
Pointed out by: bde
|
| |
|
|
|
|
|
|
| |
-ansi, due to 'long long'.
Reviewed by: green (slightly earlier version)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
debogosify some of the command-line string-number conversions into
an unsigned and signed variant.)
|
|
|
|
|
| |
makes dd(1) a more complete "filter", even if this functionality is
limited to seekable streams.
|
|
|
|
|
| |
Also, check for ftruncate() return value and die on failure, but only
try to ftruncate() when the file is a regular file.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
the correct (but less aesthetic) way, now. New lesson: correctness
and aestheticity may be mutually exclusive at times.
Brucified by: bde
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
we're done (not yet!) :)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
off_t, int, u_int64_t, etc.). dd(1) should now work properly with REALLY
big amounts of data.
|
|
|
|
| |
Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
|
| |
|
| |
|
|
|
|
| |
to be sorted. This temporarily broke the "osync" option.
|
|
|
|
|
|
|
| |
things like diskless clients' swap files etc.
Submitted by: pascal@zuo.dec.com (Pascal Pederiva) (ages ago, with many
stylistic changes by me)
|
|
|
|
|
|
|
| |
don't munge argv strings -- copy them first. avoids 'w' showing:
deraadt p8 zeus.theos.com 8:26AM 3 dd if of bs
Obtained from: OpenBSD (file rev 1.3) by Theo de Raadt <deraadt@openbsd.org>
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Some heuristics to avoid overflow in calculation attempted.
|
| |
|
|
|
|
|
| |
Reviewed by: phk
Submitted by: Josef Grosch <joeg@gagme.wwa.com>
|
|
|