dd: support iflag=skip_bytes

It allows specifying amount of bytes directly (not only amount of
blocks) is also supported by GNU's Coreutils.

function                                             old     new   delta
parse_comma_flags                                      -      93     +93
static.iflag_words                                     -      12     +12
dd_main                                             1569    1580     +11
packed_usage                                       30591   30600      +9
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 125/0)             Total: 125 bytes

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Rafał Miłecki
2016-02-01 02:17:28 +01:00
committed by Denys Vlasenko
parent 40eea690c7
commit c30a5b1373
2 changed files with 52 additions and 27 deletions

View File

@ -178,6 +178,7 @@ dd POSIX options:
conv=noerror | yes | |
conv=notrunc | yes | |
conv=sync | yes | |
iflag=skip_bytes| yes | |
dd Busybox specific options:
conv=fsync