Lines Matching refs:src_name
168 static int cp_here(const char *src_name, const char *dest_name, in cp_here() argument
171 if (! verify_file(false, src_name)) { in cp_here()
179 if ((fdi = open(src_name, O_RDONLY)) < 0) { in cp_here()
180 fprintf(stderr, "cp: cannot open '%s'\n", src_name); in cp_here()
194 fprintf(stderr, "cp: failed reading from '%s'\n", src_name); in cp_here()
213 static int mv_here(const char *src_name, const char *dest_name, in mv_here() argument
216 if (! verify_file(true, src_name)) { in mv_here()
220 if (rename(src_name, dest_name)) { in mv_here()
223 rename(src_name, dest_name)) { in mv_here()
232 static int mv_or_cp_to_dir(bool is_mv, const char *src_name, in mv_or_cp_to_dir() argument
235 if (! verify_file(is_mv, src_name)) { in mv_or_cp_to_dir()
239 const char *filename_start = strrchr(src_name, '/'); in mv_or_cp_to_dir()
241 filename_start = src_name; in mv_or_cp_to_dir()
246 is_mv ? "mv" : "cp", src_name); in mv_or_cp_to_dir()
264 return mv_here(src_name, full_filename, file_exists(full_filename), in mv_or_cp_to_dir()
267 return cp_here(src_name, full_filename, file_exists(full_filename), in mv_or_cp_to_dir()