mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-03 14:37:45 +00:00
dd: correct rendering of SI and IEC byte counts
Adjust the rendering of the concise byte counts in both SI and IEC units to better match the behavior of GNU dd. Before this commit, $ head -c 1024 /dev/zero | dd > /dev/null 2+0 records in 2+0 records out 1024 bytes (1 KB, 1024 B) copied, 0.0 s, 1.0 MB/s After this commit, $ head -c 1024 /dev/zero | dd > /dev/null 2+0 records in 2+0 records out 1024 bytes (1.0 kB, 1.0 KiB) copied, 0.0 s, 1.0 MB/s For comparison, GNU dd produces the following: $ head -c 1024 /dev/zero | dd > /dev/null 2+0 records in 2+0 records out 1024 bytes (1.0 kB, 1.0 KiB) copied, 0.000332864 s, 3.1 MB/s
This commit is contained in:
parent
3880b463fe
commit
3a5b31a30f
6 changed files with 207 additions and 50 deletions
17
Cargo.lock
generated
17
Cargo.lock
generated
|
@ -178,16 +178,6 @@ version = "3.11.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba"
|
||||
|
||||
[[package]]
|
||||
name = "byte-unit"
|
||||
version = "4.0.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "581ad4b3d627b0c09a0ccb2912148f839acaca0b93cf54cbe42b6c674e86079c"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"utf8-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bytecount"
|
||||
version = "0.6.3"
|
||||
|
@ -2184,12 +2174,6 @@ version = "0.7.6"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
||||
|
||||
[[package]]
|
||||
name = "utf8-width"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1"
|
||||
|
||||
[[package]]
|
||||
name = "uu_arch"
|
||||
version = "0.0.16"
|
||||
|
@ -2356,7 +2340,6 @@ dependencies = [
|
|||
name = "uu_dd"
|
||||
version = "0.0.16"
|
||||
dependencies = [
|
||||
"byte-unit",
|
||||
"clap",
|
||||
"gcd",
|
||||
"libc",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue