diff options
Diffstat (limited to 'ls.c')
-rw-r--r-- | ls.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 | } |