projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
272a955
)
ls could mis-color certain entries when previous commands
author
Eric Andersen
<andersen@codepoet.org>
Wed, 17 Apr 2002 20:21:45 +0000
(20:21 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Wed, 17 Apr 2002 20:21:45 +0000
(20:21 -0000)
had failed. Explicitly 0 out errno to prevent that.
coreutils/ls.c
patch
|
blob
|
history
diff --git
a/coreutils/ls.c
b/coreutils/ls.c
index bbc9114d244536e0f6ff8cb758eafed59adbbb9a..661f9a286acb1cac2fccf98f2310a02b97370a14 100644
(file)
--- a/
coreutils/ls.c
+++ b/
coreutils/ls.c
@@
-716,6
+716,7
@@
static int list_single(struct dnode *dn)
#endif
case LIST_FILENAME:
#ifdef CONFIG_FEATURE_LS_COLOR
+ errno = 0;
if (show_color && !lstat(dn->fullname, &info)) {
printf( "\033[%d;%dm", bgcolor(info.st_mode),
fgcolor(info.st_mode) );
@@
-741,6
+742,7
@@
static int list_single(struct dnode *dn)
#endif
#ifdef CONFIG_FEATURE_LS_COLOR
if (show_color) {
+ errno = 0;
printf( "\033[%d;%dm", bgcolor(info.st_mode),
fgcolor(info.st_mode) );
}