History log of /netbsd/bin/dd/dd.c (Results 1 – 25 of 53)
Revision Date Author Comments
# 38a2b7e9 04-Oct-2019 mrg <mrg@NetBSD.org>

copy libc's swab.c into dd as dd_swab(), and remove the restrict.

our implementation was fine, but the restrict marker is problematic
as gcc 8 is now more strict about checking for restrict issues.

copy libc's swab.c into dd as dd_swab(), and remove the restrict.

our implementation was fine, but the restrict marker is problematic
as gcc 8 is now more strict about checking for restrict issues.

this is the only actual consumer of swab(3) in our tree, though,
besides the test for it. oh well.

show more ...


# 4d638bd5 23-Mar-2019 mlelstv <mlelstv@NetBSD.org>

When buffers are at least page sized, explicitely request page alignment.


# 03c5b722 05-Sep-2016 sevan <sevan@NetBSD.org>

Drop main() prototype.


# 887615af 18-Mar-2015 manu <manu@NetBSD.org>

Add iflag and oflag operands to dd(1)

Like GNU dd(1) similar operands, iflag and oflag allow specifying the
O_* flags given to open(2) for the input and the output file. The values
are comma-seprata

Add iflag and oflag operands to dd(1)

Like GNU dd(1) similar operands, iflag and oflag allow specifying the
O_* flags given to open(2) for the input and the output file. The values
are comma-sepratated, lower-case, O_ prefix-stripped constants documented
in open(2).

Since iflag and oflag override default values, specifying oflag means
O_CREATE is not set by default and must be specified explicitely.

Some values do not make sense (e.g.: iflag=directory) but are still used
and will raise a warning. For oflag, values rdonly, rdwr and wronly are
filtered out with a warning (dd(1) attempts open(2) with O_RDWR and
then O_WRONLY on failure).

Specifying oflag=trunc along with (seek, oseek or conv=notrunc) is
contradictory and will raise an error.

iflag and oflag are disabled if building with -DMALLPROG

show more ...


# f71b980d 21-Feb-2012 matt <matt@NetBSD.org>

Fix a very old bug. When allocating the buffer and doing just a bs= transfer,
hen we only need a single buffer equal to that blocksize in length.


# 8648eca2 06-Nov-2011 jym <jym@NetBSD.org>

Add a new command to dd(1): msgfmt. The command modifies the
output of the information summary returned by dd(1). This can be used
to specify messages in a more usable (or parseable) format like
huma

Add a new command to dd(1): msgfmt. The command modifies the
output of the information summary returned by dd(1). This can be used
to specify messages in a more usable (or parseable) format like
human-readable values.

My intent is to re-use this for building image files and quick I/O
benchmarking.

Reviewed by tsutsui@ on tech-userlevel. See also
http://mail-index.netbsd.org/tech-userlevel/2010/12/03/msg004179.html

Some examples:

$ dd if=/dev/zero of=/dev/null bs=1m count=1 msgfmt=human
1+0 records in
1+0 records out
1048576 bytes (1,0 MB) transferred in 0.001 secs (1048576000 bytes/sec - 1,0 GB/sec)

$ dd if=/dev/zero of=/dev/null count=1 msgfmt='
> <speed>%E</speed>
> <time>%s</time>
> <bytes>%b</bytes>
> '
<speed>500 KB/sec</speed>
<time>0.001</time>
<bytes>512</bytes>

show more ...


# 275ff3e9 04-Feb-2011 pooka <pooka@NetBSD.org>

Remove the rif/rof options and add rump.dd. This makes usage
consistent with other rump clients. Copying between kernels is
done using the host pipe, e.g.:

dd if=foo rof=bar skip=1 seek=1 => dd

Remove the rif/rof options and add rump.dd. This makes usage
consistent with other rump clients. Copying between kernels is
done using the host pipe, e.g.:

dd if=foo rof=bar skip=1 seek=1 => dd if=foo skip=1 | rump.dd of=bar seek=1

Also, the pipe idiom extends to copying between different rump
kernels, e.g.:

env RUMP_SERVER=unix://srv1 rump.dd if=thefile \
| env RUMP_SERVER=unix://srv2 rump.dd of=thefile

Pipe approach suggested by yamt (thanks!)

show more ...


# b1337647 23-Dec-2010 riz <riz@NetBSD.org>

Fix speling ("deferred," not "defered") as reported in #netbsd-code on
freenode IRC. While I'm here, clean up the wording later in the comment.


# aede18bd 14-Dec-2010 pooka <pooka@NetBSD.org>

remove some leftover development garbage


# 6b03da8b 22-Nov-2010 pooka <pooka@NetBSD.org>

Add two new operands: "rif" and "rof". They operate exactly like
"if" and "of" with the exception that the communicate with a rump
kernel instead of the host kernel.

For example, to write stdout to

Add two new operands: "rif" and "rof". They operate exactly like
"if" and "of" with the exception that the communicate with a rump
kernel instead of the host kernel.

For example, to write stdout to /tmp/file.txt in a rump kernel namespace:
dd rof=/tmp/file.txt

copy /file1 to /file2 inside a rump kernel:
dd rif=/file1 rof=/file2

copy a snippet from /dev/rmd0d on the rump kernel to the host fs:
dd rif=/dev/rmd0d of=save seek=1000 count=3

Eat that, usermode OS.

(I'll document the operands one I have some manpage to refer to
for rump client use).

show more ...


# 9050ab5c 14-Feb-2009 lukem <lukem@NetBSD.org>

fix -Wsign-compare issues


# 2fe2731d 20-Jul-2008 lukem <lukem@NetBSD.org>

Remove the \n and tabs from the __COPYRIGHT() strings.


# 9655f5c2 26-May-2008 christos <christos@NetBSD.org>

PR/38755: murray armfield: /bin posix programs missing setprogname and/or
setlocale


# 8ce1f4ff 29-Apr-2007 msaitoh <msaitoh@NetBSD.org>

fix typos


# b7d86f5e 09-Jan-2006 apb <apb@NetBSD.org>

In "dd progress=N", let the value of N control how often
to print a "." to stderr. Previously, any non-zero
value behaved like "progress=1".

PR 24300

Approved by christos


# 57fc49dd 20-Apr-2005 rillig <rillig@NetBSD.org>

Fixed an off-by-one error with ASCII <-> EBCDIC conversion combined with
lcase/ucase. Approved by mrg.


# f01a4aa2 17-Jan-2004 dbj <dbj@NetBSD.org>

minor nit, set out.dbp correctly when constructing final null block
for sparse files.


# 6b493373 17-Jan-2004 dbj <dbj@NetBSD.org>

add support for conv=sparse
inspired by freebsd, although this patch attempts
to avoid some potential bugs in their implementation.


# 39973c52 15-Nov-2003 dsainty <dsainty@NetBSD.org>

Optimise previous change, using fcntl(F_DUPFD) to locate a free descriptor
for us, rather than iterating until satisfied.

Suggested by David Laight.


# 0b16f710 15-Nov-2003 dsainty <dsainty@NetBSD.org>

Avoid corrupting the dd(1) IO streams. This would happen by accidentally
outputting to the files being manipulated by opening a file in the standard IO
descriptor space. In particular, an output fi

Avoid corrupting the dd(1) IO streams. This would happen by accidentally
outputting to the files being manipulated by opening a file in the standard IO
descriptor space. In particular, an output file unlucky enough to be sitting
on descriptor 2 (stderr) is certain to be corrupted.

Addresses PR bin/8521, and passes the recently committed regression test
"bin/dd".

show more ...


# 6a75fbb6 14-Sep-2003 jschauma <jschauma@NetBSD.org>

Following private discussion with kleink@ and hubertf@ and public discussion
on tech-userlevel@, back out printescaped() functionality.
kleink: ``We sell rope.''


# 39ff49f1 20-Aug-2003 jschauma <jschauma@NetBSD.org>

Fix memory leak noted by Hubert Feyrer in private email.
Patch by Hubert Feyrer as well, OK by kleink.
(I'm just fixing it b/c it's my fault to begin with.)


# b5b29542 07-Aug-2003 agc <agc@NetBSD.org>

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


# 458ed234 04-Aug-2003 jschauma <jschauma@NetBSD.org>

As discusses a little while back on tech-userlevel:

If stdout is a tty, use vis(3) to print any filenames to prevent garbage
from being printed if the filename contains control- or other non-printab

As discusses a little while back on tech-userlevel:

If stdout is a tty, use vis(3) to print any filenames to prevent garbage
from being printed if the filename contains control- or other non-printable
characters.

While here, sprinkle some EXIT_FAILURE and NOTREACHED where appropriate.

show more ...


# caa54090 04-Sep-2002 enami <enami@NetBSD.org>

Add comment about my rev. 1.27 change.


123