Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/coreutils/install.c

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

revision 1122 by niro, Sun May 30 11:32:42 2010 UTC revision 1123 by niro, Wed Aug 18 21:56:57 2010 UTC
# Line 50  static void setdefaultfilecon(const char Line 50  static void setdefaultfilecon(const char
50    
51   if (lsetfilecon(path, scontext) < 0) {   if (lsetfilecon(path, scontext) < 0) {
52   if (errno != ENOTSUP) {   if (errno != ENOTSUP) {
53   bb_perror_msg("warning: failed to change context"   bb_perror_msg("warning: can't change context"
54   " of %s to %s", path, scontext);   " of %s to %s", path, scontext);
55   }   }
56   }   }
# Line 167  int install_main(int argc, char **argv) Line 167  int install_main(int argc, char **argv)
167   free(ddir);   free(ddir);
168   }   }
169   if (isdir)   if (isdir)
170   dest = concat_path_file(last, basename(arg));   dest = concat_path_file(last, bb_basename(arg));
171   if (copy_file(arg, dest, copy_flags)) {   if (copy_file(arg, dest, copy_flags) != 0) {
172   /* copy is not made */   /* copy is not made */
173   ret = EXIT_FAILURE;   ret = EXIT_FAILURE;
174   goto next;   goto next;
175   }   }
176     if (opts & OPT_STRIP) {
177     char *args[4];
178     args[0] = (char*)"strip";
179     args[1] = (char*)"-p"; /* -p --preserve-dates */
180     args[2] = dest;
181     args[3] = NULL;
182     if (spawn_and_wait(args)) {
183     bb_perror_msg("strip");
184     ret = EXIT_FAILURE;
185     }
186     }
187   }   }
188    
189   /* Set the file mode (always, not only with -m).   /* Set the file mode (always, not only with -m).
# Line 192  int install_main(int argc, char **argv) Line 203  int install_main(int argc, char **argv)
203   bb_perror_msg("can't change %s of %s", "ownership", dest);   bb_perror_msg("can't change %s of %s", "ownership", dest);
204   ret = EXIT_FAILURE;   ret = EXIT_FAILURE;
205   }   }
  if (opts & OPT_STRIP) {  
  char *args[3];  
  args[0] = (char*)"strip";  
  args[1] = dest;  
  args[2] = NULL;  
  if (spawn_and_wait(args)) {  
  bb_perror_msg("strip");  
  ret = EXIT_FAILURE;  
  }  
  }  
206   next:   next:
207   if (ENABLE_FEATURE_CLEAN_UP && isdir)   if (ENABLE_FEATURE_CLEAN_UP && isdir)
208   free(dest);   free(dest);

Legend:
Removed from v.1122  
changed lines
  Added in v.1123