aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/ls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index bbc9114d2..661f9a286 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -716,6 +716,7 @@ static int list_single(struct dnode *dn)
716#endif 716#endif
717 case LIST_FILENAME: 717 case LIST_FILENAME:
718#ifdef CONFIG_FEATURE_LS_COLOR 718#ifdef CONFIG_FEATURE_LS_COLOR
719 errno = 0;
719 if (show_color && !lstat(dn->fullname, &info)) { 720 if (show_color && !lstat(dn->fullname, &info)) {
720 printf( "\033[%d;%dm", bgcolor(info.st_mode), 721 printf( "\033[%d;%dm", bgcolor(info.st_mode),
721 fgcolor(info.st_mode) ); 722 fgcolor(info.st_mode) );
@@ -741,6 +742,7 @@ static int list_single(struct dnode *dn)
741#endif 742#endif
742#ifdef CONFIG_FEATURE_LS_COLOR 743#ifdef CONFIG_FEATURE_LS_COLOR
743 if (show_color) { 744 if (show_color) {
745 errno = 0;
744 printf( "\033[%d;%dm", bgcolor(info.st_mode), 746 printf( "\033[%d;%dm", bgcolor(info.st_mode),
745 fgcolor(info.st_mode) ); 747 fgcolor(info.st_mode) );
746 } 748 }