Removes 'fast read' plumbing.
The dd info page mentions a special fast-read framework if no conv=FLAG is
specified (see bs=N) which I left space for. As it turns out, this is performed already
so it does not need to be implemented.
@@ -843,17 +843,6 @@ fn read_helper<R: Read, W: Write>(i: &mut Input<R>, o: &mut Output<W>, bsize: us
{
// Local Predicate Fns -----------------------------------------------
#[inline]
- fn is_fast_read<R: Read, W: Write>(i: &Input<R>, o: &Output<W>) -> bool
- {
- // TODO: Enable this once fast_reads are implemented
- false &&
- i.ibs == o.obs
- && !is_conv(i)
- && !is_block(i)
- && !is_unblock(i)
- && !i.cflags.swab
- }
- #[inline]
fn is_conv<R: Read>(i: &Input<R>) -> bool
{
i.cflags.ctable.is_some()
@@ -882,15 +871,6 @@ fn read_helper<R: Read, W: Write>(i: &mut Input<R>, o: &mut Output<W>, bsize: us
}
}
// ------------------------------------------------------------------
- if is_fast_read(&i, &o)
- {
- // TODO: fast reads are copies performed
- // directly to output (without creating any buffers)
- // as mentioned in the dd spec.
- unimplemented!()
- }
- else
- {
// Read
let mut buf = vec![BUF_INIT_BYTE; bsize];
let mut rstat = match i.cflags.sync
@@ -921,7 +901,6 @@ fn read_helper<R: Read, W: Write>(i: &mut Input<R>, o: &mut Output<W>, bsize: us
Ok((rstat, buf))
}
}
-}
fn print_io_lines(update: &ProgUpdate)
{
