Skip to content

Commit 7f722cf

Browse files
committed
Partial fix for dd pipeline count bug
1 parent 4f45042 commit 7f722cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uu/dd/src/dd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ fn calc_loop_bsize(
13861386
) -> usize {
13871387
match count {
13881388
Some(Num::Blocks(rmax)) => {
1389-
let rsofar = rstat.reads_complete + rstat.reads_partial;
1389+
let rsofar = rstat.reads_complete;
13901390
let rremain = rmax - rsofar;
13911391
cmp::min(ideal_bsize as u64, rremain * ibs as u64) as usize
13921392
}
@@ -1403,7 +1403,7 @@ fn calc_loop_bsize(
14031403
/// `true` if no such limit is set.
14041404
fn below_count_limit(count: Option<Num>, rstat: &ReadStat) -> bool {
14051405
match count {
1406-
Some(Num::Blocks(n)) => rstat.reads_complete + rstat.reads_partial < n,
1406+
Some(Num::Blocks(n)) => rstat.reads_complete < n,
14071407
Some(Num::Bytes(n)) => rstat.bytes_total < n,
14081408
None => true,
14091409
}

0 commit comments

Comments
 (0)