Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/coreutils/libcoreutils/cp_mv_stat.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 532 by niro, Sat Sep 1 22:45:15 2007 UTC revision 816 by niro, Fri Apr 24 18:33:46 2009 UTC
# Line 23  Line 23 
23  #include "libbb.h"  #include "libbb.h"
24  #include "coreutils.h"  #include "coreutils.h"
25    
26  int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf)  int FAST_FUNC cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf)
27  {  {
28   if (sf(fn, fn_stat) < 0) {   if (sf(fn, fn_stat) < 0) {
29   if (errno != ENOENT) {   if (errno != ENOENT) {
30    #if ENABLE_FEATURE_VERBOSE_CP_MESSAGE
31     if (errno == ENOTDIR) {
32     bb_error_msg("cannot stat '%s': Path has non-directory component", fn);
33     return -1;
34     }
35    #endif
36   bb_perror_msg("cannot stat '%s'", fn);   bb_perror_msg("cannot stat '%s'", fn);
37   return -1;   return -1;
38   }   }
39   return 0;   return 0;
40   } else if (S_ISDIR(fn_stat->st_mode)) {   }
41     if (S_ISDIR(fn_stat->st_mode)) {
42   return 3;   return 3;
43   }   }
44   return 1;   return 1;
45  }  }
46    
47  int cp_mv_stat(const char *fn, struct stat *fn_stat)  int FAST_FUNC cp_mv_stat(const char *fn, struct stat *fn_stat)
48  {  {
49   return cp_mv_stat2(fn, fn_stat, stat);   return cp_mv_stat2(fn, fn_stat, stat);
50  }  }

Legend:
Removed from v.532  
changed lines
  Added in v.816