Lines Matching defs:to_fd
223 int devnull, from_fd, to_fd, serrno, files_match = 0;
264 to_fd = create_tempfile(to_name, tempfile, sizeof(tempfile));
265 if (to_fd < 0)
269 copy(from_fd, from_name, to_fd, tempfile, from_sb.st_size,
279 close(to_fd);
280 if ((to_fd = open(tempfile, O_RDONLY)) == -1)
288 int temp_fd = to_fd;
291 /* Re-open to_fd using the real target name. */
292 if ((to_fd = open(to_name, O_RDONLY)) == -1)
301 if (compare(temp_fd, tempfile, temp_sb.st_size, to_fd,
320 (void)close(to_fd);
321 to_fd = temp_fd;
331 futimens(to_fd, ts);
339 fchown(to_fd, uid, gid)) {
345 if (fchmod(to_fd, mode)) {
356 if (fchflags(to_fd,
363 fsync(to_fd);
364 (void)close(to_fd);
402 copy(int from_fd, char *from_name, int to_fd, char *to_name, off_t size,
415 if (lseek(to_fd, (off_t)0, SEEK_SET) == (off_t)-1)
434 if ((nw = write(to_fd, p, siz)) != siz) {
449 if (fstat(to_fd, &sb) != 0 || sb.st_blksize == 0)
457 nw = file_write(to_fd, buf, nr, &rem, &isem, sz);
459 nw = write(to_fd, buf, nr);
468 file_flush(to_fd, isem);
482 compare(int from_fd, const char *from_name, off_t from_len, int to_fd,
510 to_fd, to_off)) == MAP_FAILED)