Age | Commit message (Collapse) | Author |
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
|
|
final write to output. GNU dd also has this. It is useful for
write performance measurement or guaranteed writes to reliable
storage.
OK kn@ tedu@ deraadt@
|
|
We strdup operands before destructively parsing them to keep w(1) output
looking nice and neat, but after parsing we ought to free them.
We do need to keep copies for file paths, though, so add additional strdups
for operands if and of.
While here, use the preferred err(1, NULL) for an allocation failure. Also
while here, don't assign `oper' to a copy of itself because it looks strange.
"sure." deraadt
|
|
Large buffer sizes on 64-bit platforms cause the sum to wrap, leading
read(2) to fail later.
We check prior to this point that all buffer sizes are <= SSIZE_MAX.
SSIZE_MAX * 2 < SIZE_MAX on all platforms, so the addition here will
not overflow and cause a similar issue.
Discovered by tobias@ a while back.
ok deraadt millert tobias
|
|
Much simpler.
Dropping writev makes the output from summary() non-atomic, so
output lines triggered by SIGINFO can intermingle with output
lines triggered by SIGINT or atexit(3).
This behavior is difficult to trigger, even deliberately.
The buffer in dprintf is large enough so that lines produced by
summary() are not garbled if this occurs, though, so this is unlikely
to break any scripts.
Discussed at length with deraadt@, who helpfully noted that
"not all problems have perfect solutions."
ok millert@
|
|
from erroring out with "dd: skip: Undefined error: 0", mostly for
consistency and to avoid the unidiomatic, wrong looking code.
Patch from Bulat Musin <mbulatka at yandex dot ru>.
OK guenther@ millert@
|
|
exit with a non-zero EXIT STATUS, as required by POSIX,
consistent with what other operating systems do, consistent
with how other OpenBSD programs behave, and making wait(2)
consistent with what happens when dd(1) dies from other signals.
Patch from <ScottCheloha at gmail dot com>.
OK florian@ tb@.
|
|
from Scott Cheloha
|
|
|
|
Information found on: http://www.tuhs.org/cgi-bin/utree.pl
Checked by Sevan Janiyan <venture37 at geeklan dot co dot uk>.
|
|
|
|
|
|
|
|
|
|
can tame "stdio" it.
ok semarie
|
|
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
|
|
|
|
bug report from Martin Wolters
|
|
overlapping swab behavior. vaguely ok kettenis
|
|
Do not error out when the maximum permissible value is given,
but only when it is exceeded.
Patch from William Orr <will at worrbase dot com> using feedback from tedu@.
ok millert@
|
|
ok jca@ krw@
|
|
underspecified. The man page offers little guidance as to their use.
Remove them and spare people the (likely poor) decision to use them.
ok deraadt jmc millert
|
|
ok deraadt jmc
|
|
|
|
|
|
to stderr after transfer. Use the GNU syntax status=noxfer and
status=none to make dd quiet. The output is annoying in some
situations, so people redirect stderr to /dev/null. This approach
also suppresses the error messages and bugs in shell scripts remain
undetected. The new feature status=none is the better alternative.
OK mpf@
|
|
|
|
|
|
ok halex
|
|
|
|
|
|
|
|
an fd is a socket, pipe or named pipe. OK deraadt@ matthew@
|
|
ok millert jmc
|
|
|
|
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms
|
|
The size multipliers m and w are BSD extensions, not POSIX.
While here, sort the conversions alphabetically.
help and OK jmc@, sobrado@; and sthen@ on an earlier version
|
|
updates to follow;
|
|
ok jmc@
|
|
ok millert@
|
|
|
|
- note which options are extensions to POSIX
discussed w/ deraadt otto millert
|
|
skipping blocks on a raw disk device with bad sectors should be possible.
Noted by Geoff Steckel; ok tom@ deraadt@
|
|
<clock at twibright dot com>; ok deraadt@
|
|
Add range checking for cbsz.
Change type in format string to %zd and cast SSIZE_MAX to ssize_t.
Fixes PR 5278 submitted by malaler at gmail dot com.
OK otto@ and millert@.
|
|
|
|
- standard EXAMPLES
|
|
ok ray@ jaredy@ moritz@
|
|
|