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 |
} |
} |
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). |
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); |