dd: support iflag=count_bytes

It allows passing amount of bytes in the count=

function                                             old     new   delta
packed_usage                                       33599   33617     +18
static.iflag_words                                    29      41     +12
dd_main                                             1601    1607      +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 36/0)               Total: 36 bytes

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Rafał Miłecki
2021-03-24 16:01:42 +01:00
committed by Denys Vlasenko
parent 7b5cbfd6d6
commit 4eb46e1be6
2 changed files with 33 additions and 18 deletions

View File

@ -0,0 +1 @@
test "$(echo I WANT | busybox dd count=3 iflag=count_bytes 2>/dev/null)" = "I W"