Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/coreutils/libcoreutils/cp_mv_stat.c
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/coreutils/libcoreutils/cp_mv_stat.c
r1765 r2725 24 24 #include "coreutils.h" 25 25 26 int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf)26 int FAST_FUNC cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf) 27 27 { 28 28 if (sf(fn, fn_stat) < 0) { 29 29 if (errno != ENOENT) { 30 bb_perror_msg("cannot stat '%s'", fn); 30 #if ENABLE_FEATURE_VERBOSE_CP_MESSAGE 31 if (errno == ENOTDIR) { 32 bb_error_msg("can't stat '%s': Path has non-directory component", fn); 33 return -1; 34 } 35 #endif 36 bb_perror_msg("can't stat '%s'", fn); 31 37 return -1; 32 38 } 33 39 return 0; 34 } else if (S_ISDIR(fn_stat->st_mode)) { 40 } 41 if (S_ISDIR(fn_stat->st_mode)) { 35 42 return 3; 36 43 } … … 38 45 } 39 46 40 int cp_mv_stat(const char *fn, struct stat *fn_stat)47 int FAST_FUNC cp_mv_stat(const char *fn, struct stat *fn_stat) 41 48 { 42 49 return cp_mv_stat2(fn, fn_stat, stat);
Note:
See TracChangeset
for help on using the changeset viewer.