Lines Matching refs:tempfile
66 char pathbuf[PATH_MAX], tempfile[PATH_MAX];
225 char *target_name = tempfile;
264 to_fd = create_tempfile(to_name, tempfile, sizeof(tempfile));
266 err(1, "%s", tempfile);
269 copy(from_fd, from_name, to_fd, tempfile, from_sb.st_size,
273 strip(tempfile);
280 if ((to_fd = open(tempfile, O_RDONLY)) == -1)
297 (void)unlink(tempfile);
298 errc(1, serrno, "%s", tempfile);
301 if (compare(temp_fd, tempfile, temp_sb.st_size, to_fd,
314 (void)unlink(tempfile);
341 if (target_name == tempfile)
347 if (target_name == tempfile)
383 unlink(tempfile);
388 if (rename(tempfile, to_name) == -1 ) {
390 unlink(tempfile);
391 errx(1, "rename: %s to %s: %s", tempfile,