• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/netatalk-2.2.0/bin/ad/

Lines Matching defs:to

67   Returns pointer to name or NULL.
131 " -i Cause mv to write a prompt to standard error before moving a file\n"
138 " -v Cause mv to be verbose, showing files after they are moved.\n"
251 static int do_move(const char *from, const char *to)
259 * make sure the user wants to clobber it.
261 if (!fflg && !access(to, F_OK)) {
272 printf("%s not overwritten\n", to);
275 (void)fprintf(stderr, "overwrite %s? (y/n [n]) ", to);
277 } else if (access(to, W_OK) && !stat(to, &sb)) {
278 (void)fprintf(stderr, "override for %s? (y/n [n]) ", to);
311 SLOG("Cant stat %s: %s", to, strerror(errno));
315 if (rename(from, to) != 0) {
336 SLOG("rename %s to %s: %s", from, to, strerror(errno));
343 if (dvolume.volume.vfs->vfs_renamefile(&dvolume.volume, -1, from, to) != 0) {
357 if ((newdid = cnid_for_paths_parent(&dvolume, to, &newpdid)) == CNID_INVALID) {
358 SLOG("Couldn't resolve CNID for parent of %s", to);
362 if (stat(to, &sb) != 0) {
363 SLOG("Cant stat %s: %s", to, strerror(errno));
367 char *p = strdup(to);
370 SLOG("Cant update CNID for: %s", to);
377 if (ad_open_metadata(to, S_ISDIR(sb.st_mode) ? ADFLAGS_DIR : 0, O_RDWR, &ad) != 0) {
378 SLOG("Error opening adouble for: %s", to);
386 printf("%s -> %s\n", from, to);
391 return copy(from, to);
397 static int copy(const char *from, const char *to)
402 if (lstat(to, &sb) == 0) {
405 if (rmdir(to) != 0) {
406 SLOG("rmdir %s: %s", to, strerror(errno));
410 if (unlink(to) != 0) {
411 SLOG("unlink %s: %s", to, strerror(errno));
416 SLOG("%s: %s", to, strerror(errno));
420 /* Copy source to destination. */
422 execl(_PATH_AD, "ad", "cp", vflg ? "-Rpv" : "-Rp", from, to, (char *)NULL);
428 SLOG("%s cp -R %s %s: waitpid: %s", _PATH_AD, from, to, strerror(errno));
432 SLOG("%s cp -R %s %s: did not terminate normally", _PATH_AD, from, to);
440 _PATH_AD, from, to, WEXITSTATUS(status));