summaryrefslogtreecommitdiff
path: root/coreutils/ls.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-29 11:09:43 +0000
committerDenis Vlasenko2006-11-29 11:09:43 +0000
commitc61852a02bd2d61682235ba3185173f527313827 (patch)
tree6af2895da70dda926317fac31cd4db6a4b20200c /coreutils/ls.c
parent601ae1378ba7bb59e9c1a19fcc4ddd7bf9fb2e1b (diff)
downloadbusybox-c61852a02bd2d61682235ba3185173f527313827.zip
busybox-c61852a02bd2d61682235ba3185173f527313827.tar.gz
fix support for globally disabling --long-options.
(disabling them saves ~4K on fully configured bbox)
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r--coreutils/ls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 79e47ee..960c161 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -648,10 +648,12 @@ static int list_single(struct dnode *dn)
#endif
case LIST_FILENAME:
errno = 0;
+#if ENABLE_FEATURE_LS_COLOR
if (show_color && !lstat(dn->fullname, &info)) {
printf("\033[%d;%dm", bgcolor(info.st_mode),
fgcolor(info.st_mode));
}
+#endif
column += printf("%s", dn->name);
if (show_color) {
printf("\033[0m");
@@ -667,11 +669,13 @@ static int list_single(struct dnode *dn)
append = append_char(info.st_mode);
}
#endif
+#if ENABLE_FEATURE_LS_COLOR
if (show_color) {
errno = 0;
printf("\033[%d;%dm", bgcolor(info.st_mode),
fgcolor(info.st_mode));
}
+#endif
column += printf("%s", lpath) + 4;
if (show_color) {
printf("\033[0m");