diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-29 11:09:43 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-29 11:09:43 +0000 |
commit | c61852a02bd2d61682235ba3185173f527313827 (patch) | |
tree | 6af2895da70dda926317fac31cd4db6a4b20200c /coreutils/ls.c | |
parent | 601ae1378ba7bb59e9c1a19fcc4ddd7bf9fb2e1b (diff) | |
download | busybox-w32-c61852a02bd2d61682235ba3185173f527313827.tar.gz busybox-w32-c61852a02bd2d61682235ba3185173f527313827.tar.bz2 busybox-w32-c61852a02bd2d61682235ba3185173f527313827.zip |
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index 79e47ee6b..960c161b0 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -648,10 +648,12 @@ static int list_single(struct dnode *dn) | |||
648 | #endif | 648 | #endif |
649 | case LIST_FILENAME: | 649 | case LIST_FILENAME: |
650 | errno = 0; | 650 | errno = 0; |
651 | #if ENABLE_FEATURE_LS_COLOR | ||
651 | if (show_color && !lstat(dn->fullname, &info)) { | 652 | if (show_color && !lstat(dn->fullname, &info)) { |
652 | printf("\033[%d;%dm", bgcolor(info.st_mode), | 653 | printf("\033[%d;%dm", bgcolor(info.st_mode), |
653 | fgcolor(info.st_mode)); | 654 | fgcolor(info.st_mode)); |
654 | } | 655 | } |
656 | #endif | ||
655 | column += printf("%s", dn->name); | 657 | column += printf("%s", dn->name); |
656 | if (show_color) { | 658 | if (show_color) { |
657 | printf("\033[0m"); | 659 | printf("\033[0m"); |
@@ -667,11 +669,13 @@ static int list_single(struct dnode *dn) | |||
667 | append = append_char(info.st_mode); | 669 | append = append_char(info.st_mode); |
668 | } | 670 | } |
669 | #endif | 671 | #endif |
672 | #if ENABLE_FEATURE_LS_COLOR | ||
670 | if (show_color) { | 673 | if (show_color) { |
671 | errno = 0; | 674 | errno = 0; |
672 | printf("\033[%d;%dm", bgcolor(info.st_mode), | 675 | printf("\033[%d;%dm", bgcolor(info.st_mode), |
673 | fgcolor(info.st_mode)); | 676 | fgcolor(info.st_mode)); |
674 | } | 677 | } |
678 | #endif | ||
675 | column += printf("%s", lpath) + 4; | 679 | column += printf("%s", lpath) + 4; |
676 | if (show_color) { | 680 | if (show_color) { |
677 | printf("\033[0m"); | 681 | printf("\033[0m"); |