Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/libbb/remove_file.c

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

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 17  int FAST_FUNC remove_file(const char *pa Line 17  int FAST_FUNC remove_file(const char *pa
17    
18   if (lstat(path, &path_stat) < 0) {   if (lstat(path, &path_stat) < 0) {
19   if (errno != ENOENT) {   if (errno != ENOENT) {
20   bb_perror_msg("cannot stat '%s'", path);   bb_perror_msg("can't stat '%s'", path);
21   return -1;   return -1;
22   }   }
23   if (!(flags & FILEUTILS_FORCE)) {   if (!(flags & FILEUTILS_FORCE)) {
24   bb_perror_msg("cannot remove '%s'", path);   bb_perror_msg("can't remove '%s'", path);
25   return -1;   return -1;
26   }   }
27   return 0;   return 0;
# Line 63  int FAST_FUNC remove_file(const char *pa Line 63  int FAST_FUNC remove_file(const char *pa
63   }   }
64    
65   if (closedir(dp) < 0) {   if (closedir(dp) < 0) {
66   bb_perror_msg("cannot close '%s'", path);   bb_perror_msg("can't close '%s'", path);
67   return -1;   return -1;
68   }   }
69    
# Line 74  int FAST_FUNC remove_file(const char *pa Line 74  int FAST_FUNC remove_file(const char *pa
74   }   }
75    
76   if (rmdir(path) < 0) {   if (rmdir(path) < 0) {
77   bb_perror_msg("cannot remove '%s'", path);   bb_perror_msg("can't remove '%s'", path);
78   return -1;   return -1;
79   }   }
80    
# Line 94  int FAST_FUNC remove_file(const char *pa Line 94  int FAST_FUNC remove_file(const char *pa
94   }   }
95    
96   if (unlink(path) < 0) {   if (unlink(path) < 0) {
97   bb_perror_msg("cannot remove '%s'", path);   bb_perror_msg("can't remove '%s'", path);
98   return -1;   return -1;
99   }   }
100    

Legend:
Removed from v.983  
changed lines
  Added in v.984