[PATCH] ls: fix support for long options when FEATURE_LS_COLOR is deselected

Xabier Oneca -- xOneca xoneca at gmail.com
Fri May 26 15:20:33 UTC 2017


Hello,

>  Xabier Oneca:
>> Shouldn't "--color" be guarded by IF_FEATURE_LS_COLOR, then?
>
>  As I understand it, it's a choice: if a feature is not selected
> at build time, guarding the option declaration in applet_long_options
> makes busybox fail when the option is given at run-time, whereas not
> guarding it (i.e. always declaring the option) makes busybox silently
> ignore it. Both approaches are justifiable.
>
>  Since neither --full-time nor --group-directories-first appeared
> to be guarded (by FEATURE_LS_TIMESTAMPS and FEATURE_LS_SORTFILES
> respectively), I chose to stay as close as possible to the existing
> code and not guard --color either.

Got it! You are right.


More information about the busybox mailing list