cp: add ENABLE_FEATURE_VERBOSE_CP_MESSAGE. Closes bug 1470

This commit is contained in:
Denis Vlasenko
2008-02-13 16:52:00 +00:00
parent 9d96af2e83
commit d5fe880a57
3 changed files with 32 additions and 1 deletions

View File

@ -27,6 +27,12 @@ int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf)
{
if (sf(fn, fn_stat) < 0) {
if (errno != ENOENT) {
#if ENABLE_FEATURE_VERBOSE_CP_MESSAGE
if (errno == ENOTDIR) {
bb_error_msg("cannot stat '%s': Path has non-directory component", fn);
return -1;
}
#endif
bb_perror_msg("cannot stat '%s'", fn);
return -1;
}