summaryrefslogtreecommitdiff
path: root/coreutils/ls.c
diff options
context:
space:
mode:
authorMatt Kraai2000-12-18 03:57:16 +0000
committerMatt Kraai2000-12-18 03:57:16 +0000
commit1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5 (patch)
treeb85a425c19b299f5d8635599e11c78c96f12a4c2 /coreutils/ls.c
parent0dab82997777bffb95d01d68e1628ee79207a03d (diff)
downloadbusybox-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.zip
busybox-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.tar.gz
Change calls to error_msg.* and strerror to use perror_msg.*.
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r--coreutils/ls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 655dd7f..e44bd9b 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -181,7 +181,7 @@ static int my_stat(struct dnode *cur)
#ifdef BB_FEATURE_LS_FOLLOWLINKS
if (follow_links == TRUE) {
if (stat(cur->fullname, &cur->dstat)) {
- error_msg("%s: %s\n", cur->fullname, strerror(errno));
+ perror_msg("%s", cur->fullname);
status = EXIT_FAILURE;
free(cur->fullname);
free(cur);
@@ -190,7 +190,7 @@ static int my_stat(struct dnode *cur)
} else
#endif
if (lstat(cur->fullname, &cur->dstat)) {
- error_msg("%s: %s\n", cur->fullname, strerror(errno));
+ perror_msg("%s", cur->fullname);
status = EXIT_FAILURE;
free(cur->fullname);
free(cur);
@@ -511,7 +511,7 @@ struct dnode **list_dir(char *path)
nfiles= 0;
dir = opendir(path);
if (dir == NULL) {
- error_msg("%s: %s\n", path, strerror(errno));
+ perror_msg("%s", path);
status = EXIT_FAILURE;
return(NULL); /* could not open the dir */
}