| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
| |
set WARNS=0.
Reviewed by: mike
|
| |
|
| |
|
|
|
|
| |
Submitted by: Mike Barcroft <mike@q9media.com>
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Obtained from: OpenBSD
|
| |
|
| |
|
|
|
|
|
| |
makes dd(1) a more complete "filter", even if this functionality is
limited to seekable streams.
|
|
|
|
| |
<time.h>).
|
| |
|
|
|
|
|
| |
Also, check for ftruncate() return value and die on failure, but only
try to ftruncate() when the file is a regular file.
|
|
|
|
|
|
| |
to be overwritten.
Submitted by: green
|
|
|
|
| |
put the whitespace in the right place.
|
|
|
|
| |
Brucified by: bde
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
PR: 16750
Submitted by: Giorgos Keramidas <keramida@ceid.upatras.gr>
|
|
|
|
|
|
|
| |
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!) :)
|
|
|
|
| |
Allow a device type of D_DISK or D_MEM to be ISSEEK.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Pointy hat: green
Pointed out by: peter
|
| |
|
| |
|
|
|
|
|
|
| |
Also, fix pos_out() to do the same checks pos_in() did.
Done for: jdp, luigi, the good of the world
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Obtained from: OpenBSD
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
specifies exiting with a zero status if the file was copied
successfully, and with a nonzero status if an error occurred. We
are too sloppy to tell if the file was copied successfully when we
get killed by a SIGINT, but it is unlikely to have been. Added a
comment about related sloppiness (calling exit() from a signal
handler).
|
|
|
|
| |
Reviewed by: bde
|
|
|
|
| |
-g. ;)
|
|
|
|
|
|
|
|
|
|
| |
dd if=/dev/zero of=/dev=null obs=23520 conv=swab
coredumped.
Please somebody review it, i'm not 105 % sure i'm understanding all
this mess correctly.
Detected by: Holm Tiffe <holm@geophysik.tu-freiberg.de>
|
|
|
|
| |
Pointed-out-by: bde (a long while ago)
|
|
|
|
| |
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)
|
| |
|
|
|
|
| |
Obtained from: OpenBSD (file rev 1.5) Theo de Raadt <deraadt@openbsd.org>
|
|
|
|
|
|
|
| |
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>
|