[Toybox] [CLEANUP] dd
Isaac Dunham
ibid.ag at gmail.com
Fri May 2 17:04:03 PDT 2014
On Fri, May 02, 2014 at 06:09:23AM -0500, Rob Landley wrote:
> The size suffices are also kind of weird weird. We already have atolx()
> which is parsing suffixes, but these are _different_ suffixes, and it's
> got a "d" option to do decimal instead of binary units (so multibyte
> suffixes). It's using "c" is 1, "w" is 2, "b" is 512 (presumably meaning
> disk block size, except it's 4096 these days)... It has mega and giga
> but not tera? I guess you don't want to malloc a terabyte any time soon,
> but that's fairly domain specific and might change within 10 years.
>
> Is this really what posix specifies?
>
> Nope: posix specifies "k" and "b", and that's it. This seems to have
> come from gnu, and busybox seems to have copied gnu, and this is just
> implementing what gnu did. Except busybox added "swab" last year, so the
> set of options this command is implementing is basically a snapshot of
> what busybox was doing at some point in the past.
>
Please also include mega (it's handy for writing disk images).
> (Why did busybox implement swab? The mailing list has somebody just
> submitting it out of the blue without actually explaining their use case
> for it. I'd think this option was on the obsolete side: the "nuxi"
> problem was fairly specific to 16 bit systems, 32 bit systems have the
> "xinu" problem instead. :)
Don't know why it was added, but openwrt backported it with this
justification:
Some boards have the WLAN EEPROM stored in flash in big-endian format,
whereas the driver requires the EEPROM in little-endian format.
The conv=swab option in dd is particularly useful in this case.
HTH,
Isaac Dunham
1399075443.0
More information about the Toybox
mailing list