aboutsummaryrefslogtreecommitdiff
path: root/coreutils/ls.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-12-18 03:57:16 +0000
committerMatt Kraai <kraai@debian.org>2000-12-18 03:57:16 +0000
commit1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5 (patch)
treeb85a425c19b299f5d8635599e11c78c96f12a4c2 /coreutils/ls.c
parent0dab82997777bffb95d01d68e1628ee79207a03d (diff)
downloadbusybox-w32-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.tar.gz
busybox-w32-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.tar.bz2
busybox-w32-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.zip
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 655dd7ff4..e44bd9b93 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -181,7 +181,7 @@ static int my_stat(struct dnode *cur)
181#ifdef BB_FEATURE_LS_FOLLOWLINKS 181#ifdef BB_FEATURE_LS_FOLLOWLINKS
182 if (follow_links == TRUE) { 182 if (follow_links == TRUE) {
183 if (stat(cur->fullname, &cur->dstat)) { 183 if (stat(cur->fullname, &cur->dstat)) {
184 error_msg("%s: %s\n", cur->fullname, strerror(errno)); 184 perror_msg("%s", cur->fullname);
185 status = EXIT_FAILURE; 185 status = EXIT_FAILURE;
186 free(cur->fullname); 186 free(cur->fullname);
187 free(cur); 187 free(cur);
@@ -190,7 +190,7 @@ static int my_stat(struct dnode *cur)
190 } else 190 } else
191#endif 191#endif
192 if (lstat(cur->fullname, &cur->dstat)) { 192 if (lstat(cur->fullname, &cur->dstat)) {
193 error_msg("%s: %s\n", cur->fullname, strerror(errno)); 193 perror_msg("%s", cur->fullname);
194 status = EXIT_FAILURE; 194 status = EXIT_FAILURE;
195 free(cur->fullname); 195 free(cur->fullname);
196 free(cur); 196 free(cur);
@@ -511,7 +511,7 @@ struct dnode **list_dir(char *path)
511 nfiles= 0; 511 nfiles= 0;
512 dir = opendir(path); 512 dir = opendir(path);
513 if (dir == NULL) { 513 if (dir == NULL) {
514 error_msg("%s: %s\n", path, strerror(errno)); 514 perror_msg("%s", path);
515 status = EXIT_FAILURE; 515 status = EXIT_FAILURE;
516 return(NULL); /* could not open the dir */ 516 return(NULL); /* could not open the dir */
517 } 517 }