uutils / uutils/coreutils

minorbug(dd): it do not show how many bytes copied

Open
#13,092 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - dd
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

Hi, uutils mainteners

we confirmed a minor issue with the dd command i used

relunsec@relunsec:~/software/coreutils/target/debug$ sudo ./dd if=/dev/mem of=a
dd: IO error: Permission denied
relunsec@relunsec:~/software/coreutils/target/debug$ 

as you can see the content copied to a whiches good, but it stops after a permission denied, but it do not show how many bytes copied
while the gnu one does

relunsec@relunsec:~/software/coreutils/target/debug$ sudo gnudd if=/dev/mem of=a
gnudd: error reading '/dev/mem': Operation not permitted
2048+0 records in
2048+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0461996 s, 22.7 MB/s
relunsec@relunsec:~/software/coreutils/target/debug$ 

after the kernel error reached because the kernel block reading other regions, it showed how many bytes copied successfully before the error appeared

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Rust implementation of the dd command and reproduce the /dev/mem read failure shown in the issue. Compare the error path with GNU dd's byte-count output; done means reporting how many bytes were copied successfully before a later permission error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.