On 02/10/2012 04:21 PM, Jérémy Compostella wrote:
> Pádraig, others,
>
> First, I added the missing seek_bytes feature.
> Second, I re-wrote the patch in order to replace the _bytes operands by the
> corresponding input/output flags.
> Finally, I added some tests to check the new seek_bytes flag.
>
> I successfully run the entire tests suite.
Excellent.
I'll review fully later.
> * doc/coreutils.texi (New features): Detail new flags and behaviors.
s/New features/dd invocation/
I've also attached a diff of some adjustments to --amend to the texinfo.
cheers,
Pádraig.
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 6efc5cc..02c3a2a 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -8060,15 +8060,21 @@ use @var{bytes} as the fixed record length.
@item skip=@var{n}
@opindex skip
Skip @var{n} @samp{ibs}-byte blocks in the input file before copying.
+If @samp{iflag=skip_bytes} is specified, @var{n} is interpreted
+as a byte count rather than a block count.
@item seek=@var{n}
@opindex seek
Skip @var{n} @samp{obs}-byte blocks in the output file before copying.
+if @samp{oflag=seek_bytes} is specified, @var{n} is interpreted
+as a byte count rather than a block count.
@item count=@var{n}
@opindex count
Copy @var{n} @samp{ibs}-byte blocks from the input file, instead
of everything until the end of the file.
+if @samp{iflag=count_bytes} is specified, @var{n} is interpreted
+as a byte count rather than a block count.
@item status=noxfer
@opindex status
@@ -8323,20 +8329,23 @@ This flag can be used only with @code{iflag}.
@item count_bytes
@opindex count_bytes
-Use byte unit instead of @samp{ibs}-byte block unit for the
-@samp{count=n} operand.
+Interpret the @samp{count=} operand as a byte count,
+rather than a block count, which allows specifying
+a length that is not a multiple of the I/O block size.
This flag can be used only with @code{iflag}.
@item skip_bytes
@opindex skip_bytes
-Use byte unit instead of @samp{ibs}-byte block unit for the
-@samp{skip=n} operand.
+Interpret the @samp{skip=} operand as a byte count,
+rather than a block count, which allows specifying
+an offset that is not a multiple of the I/O block size.
This flag can be used only with @code{iflag}.
@item seek_bytes
@opindex seek_bytes
-Use byte unit instead of @samp{obs}-byte block unit for the
-@samp{seek=n} operand.
+Interpret the @samp{seek=} operand as a byte count,
+rather than a block count, which allows specifying
+an offset that is not a multiple of the I/O block size.
This flag can be used only with @code{oflag}.
@end table
@@ -8361,13 +8370,12 @@ should not be too large---values larger than a few
megabytes
are generally wasteful or (as in the gigabyte..exabyte case) downright
counterproductive or error-inducing.
-Use different @command{dd} invocations to use different block sizes
-for skipping and I/O@. To process data that is at an offset or size
-that is not a multiple of the I/O@ block size, you can use the
-count_bytes and skip_bytes input flag and the seek_bytes output flag.
-Alternatively the traditional method of separate @command{dd}
-invocations can be used. For example, the following shell commands
-copy data in 512 KiB blocks between a disk and a tape, but do not save
+To process data that is at an offset or size that is not a
+multiple of the I/O@ block size, you can use the @samp{skip_bytes},
+@samp{seek_bytes} and @samp{count_bytes} flags. Alternatively
+the traditional method of separate @command{dd} invocations can be used.
+For example, the following shell commands copy data
+in 512 KiB blocks between a disk and a tape, but do not save
or restore a 4 KiB label at the start of the disk:
@example