• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/src/router/busybox-1.x/libbb/

Lines Matching defs:dest

18 // If dest is a softlink, we overwrite softlink's destination!
28 // errno must be set to relevant value ("why we cannot create dest?")
30 static int ask_and_unlink(const char *dest, int flags)
35 bb_perror_msg("cannot create '%s'", dest);
48 fprintf(stderr, "%s: overwrite '%s'? ", applet_name, dest);
52 if (unlink(dest) < 0) {
53 bb_perror_msg("cannot remove '%s'", dest);
64 int copy_file(const char *source, const char *dest, int flags)
85 if (lstat(dest, &dest_stat) < 0) {
87 bb_perror_msg("cannot stat '%s'", dest);
94 bb_error_msg("'%s' and '%s' are the same file", source, dest);
141 bb_error_msg("target '%s' is not a directory", dest);
145 * this check and actual creation of files inside dest */
155 if (mkdir(dest, mode) < 0) {
157 bb_perror_msg("cannot create directory '%s'", dest);
162 if (lstat(dest, &dest_stat) < 0) {
163 bb_perror_msg("cannot stat '%s'", dest);
184 new_dest = concat_path_file(dest, d->d_name);
193 && chmod(dest, source_stat.st_mode & ~saved_umask) < 0
195 bb_perror_msg("cannot preserve %s of '%s'", "permissions", dest);
208 if (lf(source, dest) < 0) {
209 ovr = ask_and_unlink(dest, flags);
212 if (lf(source, dest) < 0) {
213 bb_perror_msg("cannot create link '%s'", dest);
233 if (link(link_target, dest) < 0) {
234 ovr = ask_and_unlink(dest, flags);
237 if (link(link_target, dest) < 0) {
238 bb_perror_msg("cannot create link '%s'", dest);
244 add_to_ino_dev_hashtable(&source_stat, dest);
260 dst_fd = open(dest, O_WRONLY|O_CREAT|O_TRUNC, source_stat.st_mode);
262 dst_fd = open(dest, O_WRONLY|O_CREAT|O_EXCL, source_stat.st_mode);
264 ovr = ask_and_unlink(dest, flags);
270 dst_fd = open3_or_warn(dest, O_WRONLY|O_CREAT|O_EXCL, source_stat.st_mode);
288 if (setfilecon(dest, con) == -1) {
289 bb_perror_msg("setfilecon:%s,%s", dest, con);
301 bb_perror_msg("cannot close '%s'", dest);
313 ovr = ask_and_unlink(dest, flags);
320 int r = symlink(lpath, dest);
323 bb_perror_msg("cannot create symlink '%s'", dest);
327 if (lchown(dest, source_stat.st_uid, source_stat.st_gid) < 0)
328 bb_perror_msg("cannot preserve %s of '%s'", "ownership", dest);
337 if (mknod(dest, source_stat.st_mode, source_stat.st_rdev) < 0) {
338 bb_perror_msg("cannot create '%s'", dest);
357 if (utime(dest, &times) < 0)
358 bb_perror_msg("cannot preserve %s of '%s'", "times", dest);
359 if (chown(dest, source_stat.st_uid, source_stat.st_gid) < 0) {
361 bb_perror_msg("cannot preserve %s of '%s'", "ownership", dest);
363 if (chmod(dest, source_stat.st_mode) < 0)
364 bb_perror_msg("cannot preserve %s of '%s'", "permissions", dest);