ls: fix support for long options when FEATURE_LS_COLOR is deselected
authorLaurent Bercot <ska-dietlibc@skarnet.org>
Fri, 26 May 2017 14:50:53 +0000 (16:50 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 26 May 2017 14:50:53 +0000 (16:50 +0200)
commit2599937c4e5012d8e410d58574d22dec92e6eaa5
tree045f52dfe01397291a8e21de49c0fca08e7beb99
parent13d72c3fd979a047179b1342dcae026379af0617
ls: fix support for long options when FEATURE_LS_COLOR is deselected

Declaration of ls_longopts and initialization of applet_long_options
were incorrectly guarded with ENABLE_FEATURE_LS_COLOR; that yielded a
"ls: NO_OPT: \xff" error message when long options were selected and
color support was not. This patch ensures long options are
initialized separately from color support.

Signed-off-by: Laurent Bercot <ska-dietlibc@skarnet.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/ls.c