nuttx-apps icon indicating copy to clipboard operation
nuttx-apps copied to clipboard

dd_main.c: Add oseek optional argument.

Open dry-75 opened this issue 1 year ago • 1 comments

Add oseek optional parameter to seek/skip on output file.

Summary

If oseek=N passed, will seek N*bs on output file before witing. Optional, keeping existing seek and bs as-is.

Impact

Testing

dd if=/dev/zero of=/dev/mtd0 bs=1 count=32 oseek=15728640

dry-75 avatar Jul 05 '24 01:07 dry-75

i feel it a bit inconsistent to have skip and oseek while you don't have iseek or seek.

yamt avatar Jul 05 '24 01:07 yamt

i feel it a bit inconsistent to have skip and oseek while you don't have iseek or seek.

Yes, dd from host name it seek:

dd --help
Usage: dd [OPERAND]...
  or:  dd OPTION
Copy a file, converting and formatting according to the operands.
...
  seek=N          skip N obs-sized blocks at start of output
  skip=N          skip N ibs-sized blocks at start of input

@dry-75 please use the same option as host version.

xiaoxiang781216 avatar Jul 07 '24 02:07 xiaoxiang781216

updated.

dry-75 avatar Jul 07 '24 22:07 dry-75