1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #2915 from jfinkels/dd-status-noxfer

dd: correct behavior when status=noxfer
This commit is contained in:
Sylvestre Ledru 2022-01-25 23:19:53 +01:00 committed by GitHub
commit 5c45911c13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -398,8 +398,13 @@ where
}
match i.print_level {
Some(StatusLevel::Noxfer) | Some(StatusLevel::None) => {}
_ => print_transfer_stats(&ProgUpdate {
Some(StatusLevel::None) => {}
Some(StatusLevel::Noxfer) => print_io_lines(&ProgUpdate {
read_stat: rstat,
write_stat: wstat,
duration: start.elapsed(),
}),
Some(StatusLevel::Progress) | None => print_transfer_stats(&ProgUpdate {
read_stat: rstat,
write_stat: wstat,
duration: start.elapsed(),

View file

@ -183,7 +183,7 @@ fn test_final_stats_noxfer() {
new_ucmd!()
.args(&["status=noxfer"])
.succeeds()
.stderr_only("");
.stderr_only("0+0 records in\n0+0 records out\n");
}
#[test]