[Toybox] [PATCH] Fix od output format when using only legacy type specifiers

Samuel Holland samuel at sholland.net
Fri Apr 25 05:02:52 PDT 2014


On 04/25/2014 05:55 AM, Rob Landley wrote:
> On 04/24/14 18:47, Samuel Holland wrote:
>> This behavior broke building busybox with CONFIG_FEATURE_COMPRESS_USAGE
>> as it uses "od -v -b" in applets/usage_compressed
>
> Busybox defconfig won't build with busybox's tr command (the libm
> probing fails), so I'm not _too_ embarassed about that.  Still need to
> fix it, though. :)

I'm assuming you're referring to building against uClibc. Bootstrapping 
busybox works fine against musl, but that's probably because it doesn't 
have a separate libm.

>> -  if (!TT.output_base) append_base("o2");
>> +  if (!TT.output_base && !(toys.optflags &
>> +       (FLAG_b|FLAG_c|FLAG_d|FLAG_o|FLAG_s|FLAG_x)))
>> append_base("o2");
>
> Hmmm, that's a much more complicated test, and it's essentially
> repeating the flag list right above it.
>
> The TT.output_base check was _supposed_ to cover this. The intended
> logic was "only add an output type if we haven't already got an output
> type", but output_base is the explicit list of command line output types
> so it's checking the wrong variable. TT.types is the count of output
> types (incremented by append_base) so checking that's not zero is the
> correct thing to do.
>
> Checked in the smaller fix.

Works for me.

> Thanks,
>
> Rob

Thanks,

Samuel


 1398427372.0


More information about the Toybox mailing list